diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php index 81a507c943..2203b654fa 100644 --- a/settings/Controller/AppSettingsController.php +++ b/settings/Controller/AppSettingsController.php @@ -140,6 +140,7 @@ class AppSettingsController extends Controller { $params['urlGenerator'] = $this->urlGenerator; $params['updateCount'] = count($this->getAppsWithUpdates()); $params['developerDocumentation'] = $this->urlGenerator->linkToDocs('developer-manual'); + $params['bundles'] = $this->getBundles(); $this->navigationManager->setActiveEntry('core_apps'); $templateResponse = new TemplateResponse('settings', 'settings', ['serverData' => $params]); @@ -150,6 +151,20 @@ class AppSettingsController extends Controller { return $templateResponse; } + private function getBundles() { + $result = []; + $bundles = $this->bundleFetcher->getBundles(); + foreach ($bundles as $bundle) { + $result[] = [ + 'name' => $bundle->getName(), + 'id' => $bundle->getIdentifier(), + 'appIdentifiers' => $bundle->getAppIdentifiers() + ]; + } + return $result; + + } + private function getAllCategories() { $currentLanguage = substr($this->l10nFactory->findLanguage(), 0, 2); @@ -385,28 +400,22 @@ class AppSettingsController extends Controller { foreach($bundles as $bundle) { $newCategory = true; $allApps = $appClass->listAllApps(); - $categories = $this->getAllCategories(); - foreach($categories as $singleCategory) { - $newApps = $this->getAppsForCategory($singleCategory['id']); - foreach($allApps as $app) { - foreach($newApps as $key => $newApp) { - if($app['id'] === $newApp['id']) { - unset($newApps[$key]); - } + + $newApps = $this->getAppsForCategory(); + foreach($allApps as $app) { + foreach($newApps as $key => $newApp) { + if($app['id'] === $newApp['id']) { + unset($newApps[$key]); } } - $allApps = array_merge($allApps, $newApps); } + $allApps = array_merge($allApps, $newApps); + foreach($bundle->getAppIdentifiers() as $identifier) { foreach($allApps as $app) { if($app['id'] === $identifier) { - if($newCategory) { - $app['newCategory'] = true; - $app['categoryName'] = $bundle->getName(); - } $app['bundleId'] = $bundle->getIdentifier(); - $newCategory = false; $apps[] = $app; continue; } diff --git a/settings/src/components/appList.vue b/settings/src/components/appList.vue index 2bec287a28..ebaab914d8 100644 --- a/settings/src/components/appList.vue +++ b/settings/src/components/appList.vue @@ -27,16 +27,16 @@
-