fix issue with links

This commit is contained in:
Simon Vieille 2020-08-14 13:30:48 +02:00
parent 39aede4a73
commit b5ce8b92e1
Signed by: deblan
GPG key ID: 03383D15A1D31745
2 changed files with 4 additions and 1 deletions

View file

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

View file

@ -44,6 +44,7 @@ class AppRepository
if (isset($navigation[$id])) { if (isset($navigation[$id])) {
$app['name'] = $this->l10nFactory->get($app['id'])->t($app['name']); $app['name'] = $this->l10nFactory->get($app['id'])->t($app['name']);
$app['href'] = $navigation[$id]['href'];
$visibleApps[$id] = $app; $visibleApps[$id] = $app;
} }
@ -54,6 +55,7 @@ class AppRepository
$visibleApps[$app['id']] = [ $visibleApps[$app['id']] = [
'id' => $app['id'], 'id' => $app['id'],
'name' => $this->l10nFactory->get($app['id'])->t($app['name']), 'name' => $this->l10nFactory->get($app['id'])->t($app['name']),
'href' => $app['href'],
'preview' => $app['icon'], 'preview' => $app['icon'],
'previewAsIcon' => true, 'previewAsIcon' => true,
'category' => [ 'category' => [
@ -64,6 +66,7 @@ class AppRepository
$visibleApps[$app['id']] = [ $visibleApps[$app['id']] = [
'id' => $app['id'], 'id' => $app['id'],
'name' => $this->l10nFactory->get($app['id'])->t($app['name']), 'name' => $this->l10nFactory->get($app['id'])->t($app['name']),
'href' => $app['href'],
'preview' => $app['icon'], 'preview' => $app['icon'],
'previewAsIcon' => true, 'previewAsIcon' => true,
'category' => [], 'category' => [],