From b953b7fd38cf19818446adf3663c6467cbbd8019 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Fri, 26 Apr 2024 23:10:19 +0300 Subject: [PATCH] update --- web/app/Filament/Pages/Modules.php | 5 +++++ web/app/ModulesManager.php | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/web/app/Filament/Pages/Modules.php b/web/app/Filament/Pages/Modules.php index ee16455..8543d34 100644 --- a/web/app/Filament/Pages/Modules.php +++ b/web/app/Filament/Pages/Modules.php @@ -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'); } } diff --git a/web/app/ModulesManager.php b/web/app/ModulesManager.php index 6bf8233..ee4f753 100644 --- a/web/app/ModulesManager.php +++ b/web/app/ModulesManager.php @@ -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,