This commit is contained in:
Bozhidar 2024-04-26 23:10:19 +03:00
parent 1c879c04fe
commit b953b7fd38
2 changed files with 11 additions and 0 deletions

View file

@ -51,6 +51,11 @@ class Modules extends Page
ModulesManager::saveInstalledModule($this->installModule);
$moduleInfo = ModulesManager::getModuleInfo($this->installModule);
if (isset($moduleInfo['adminUrl'])) {
return $this->redirect($moduleInfo['adminUrl']);
}
$this->dispatch('close-modal', id: 'install-module-modal');
}
}

View file

@ -44,6 +44,11 @@ class ModulesManager
if (isset($moduleJson['category'])) {
$category = $moduleJson['category'];
}
$adminUrl = '';
if (isset($moduleJson['adminUrl'])) {
$adminUrl = $moduleJson['adminUrl'];
}
$url = '';
$installed = 0;
$findModule = Module::where('name', $module)->first();
@ -54,6 +59,7 @@ class ModulesManager
'name' => $module,
'description' => 'A drag and drop website builder and a powerful next-generation CMS.',
'url' => $url,
'adminUrl' => $adminUrl,
'iconUrl' => url('images/modules/' . $module . '.png'),
'logoIcon' => $logoIcon,
'category' => $category,