add ordered apps for all displays (#147)

This commit is contained in:
Simon Vieille 2022-10-27 21:52:29 +02:00
parent 07c7221ca2
commit 1971c6f500
Signed by: deblan
GPG key ID: 579388D585F70417
2 changed files with 3 additions and 7 deletions

View file

@ -93,7 +93,7 @@ class NavController extends Controller
]);
}
$apps = $this->appRepository->getVisibleApps();
$apps = $this->appRepository->getOrderedApps();
$categoriesLabels = $this->categoryRepository->getOrderedCategories();
$hiddenApps = $this->config->getAppValueArray('big-menu-hidden-apps', '[]');
$isForced = $this->config->getAppValueBool('force', '0');
@ -178,10 +178,6 @@ class NavController extends Controller
foreach ($items as $category => $value) {
if (empty($items[$category]['apps'])) {
unset($items[$category]);
} else {
uasort($items[$category]['apps'], function ($a, $b) {
return ($a['name'] < $b['name']) ? -1 : 1;
});
}
}

View file

@ -159,11 +159,11 @@ class Admin implements ISettings
'force' => $this->config->getAppValue('force', '0'),
'target-blank-apps' => $this->config->getAppValueArray('target-blank-apps', '[]'),
'top-menu-apps' => $this->config->getAppValueArray('top-menu-apps', '[]'),
'top-menu-apps-order' => $this->config->getAppValueArray('top-menu-apps-order', '[]'),
'apps-order' => $this->config->getAppValueArray('apps-order', '[]'),
'ordered-apps' => $this->appRepository->getOrderedApps(),
'top-side-menu-apps' => $this->config->getAppValueArray('top-side-menu-apps', '[]'),
'default-enabled' => $this->config->getAppValue('default-enabled', '1'),
'apps' => $this->appRepository->getVisibleApps(),
'top-menu-ordered-apps' => $this->appRepository->getTopMenuOrderedApps(),
'apps-categories-custom' => $this->config->getAppValueArray('apps-categories-custom', '[]'),
'categories-order-type' => $this->config->getAppValue('categories-order-type', 'default'),
'categories-order' => $this->config->getAppValueArray('categories-order', '[]'),