forked from deblan/side_menu
fix #24: missing apps
This commit is contained in:
parent
e7d319bbf7
commit
e4f9765247
|
@ -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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,13 +42,16 @@ class AppRepository
|
|||
foreach ($apps as $app) {
|
||||
$id = $app['id'];
|
||||
|
||||
foreach ([$app['id'], $app['id'].'_index'] as $id) {
|
||||
if (isset($navigation[$id])) {
|
||||
$app['name'] = $this->l10nFactory->get($app['id'])->t($app['name']);
|
||||
$app['name'] = $this->l10nFactory->get($id)->t($app['name']);
|
||||
$app['href'] = $navigation[$id]['href'];
|
||||
$app['icon'] = $navigation[$id]['icon'];
|
||||
|
||||
$visibleApps[$id] = $app;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($navigation as $app) {
|
||||
if ('external_index' === substr($app['id'], 0, 14)) {
|
||||
|
@ -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' => [],
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue