fix #24: missing apps

This commit is contained in:
Simon Vieille 2020-08-19 09:18:29 +02:00
parent e7d319bbf7
commit e4f9765247
Signed by: deblan
GPG key ID: 03383D15A1D31745
2 changed files with 10 additions and 9 deletions

View file

@ -154,7 +154,7 @@ class NavController extends Controller
$items[$category]['apps'][$app['id']] = [
'name' => $app['name'],
'href' => $app['href'],
'icon' => $app['previewAsIcon'] ? $app['preview'] : null,
'icon' => $app['icon'],
];
}
}

View file

@ -42,11 +42,14 @@ class AppRepository
foreach ($apps as $app) {
$id = $app['id'];
if (isset($navigation[$id])) {
$app['name'] = $this->l10nFactory->get($app['id'])->t($app['name']);
$app['href'] = $navigation[$id]['href'];
foreach ([$app['id'], $app['id'].'_index'] as $id) {
if (isset($navigation[$id])) {
$app['name'] = $this->l10nFactory->get($id)->t($app['name']);
$app['href'] = $navigation[$id]['href'];
$app['icon'] = $navigation[$id]['icon'];
$visibleApps[$id] = $app;
$visibleApps[$id] = $app;
}
}
}
@ -56,8 +59,7 @@ class AppRepository
'id' => $app['id'],
'name' => $this->l10nFactory->get($app['id'])->t($app['name']),
'href' => $app['href'],
'preview' => $app['icon'],
'previewAsIcon' => true,
'icon' => $app['icon'],
'category' => [
'external_links',
],
@ -67,8 +69,7 @@ class AppRepository
'id' => $app['id'],
'name' => $this->l10nFactory->get($app['id'])->t($app['name']),
'href' => $app['href'],
'preview' => $app['icon'],
'previewAsIcon' => true,
'icon' => $app['icon'],
'category' => [],
];
}