add 'top-menu-mouse-over-hidden-label' as window property and use it in the AppMenu component

This commit is contained in:
Simon Vieille 2022-12-26 12:57:07 +01:00
parent 47af9088d4
commit 08b418d55d
3 changed files with 6 additions and 0 deletions

View file

@ -171,6 +171,10 @@ class JsController extends Controller
'avatar' => $avatar,
'top-menu-apps' => $topMenuApps,
'top-side-menu-apps' => $topSideMenuApps,
'top-menu-mouse-over-hidden-label' => $this->config->getAppValueBool(
'top-menu-mouse-over-hidden-label',
'0'
),
'target-blank-apps' => $targetBlankApps,
'settings' => $settings,
'logo' => $this->themingDefaults->getLogo(),

View file

@ -101,6 +101,7 @@ export default {
})
this.targetBlankApps = window.targetBlankApps
this.hiddenLabels = window.topMenuAppsMouseOverHiddenLabel
this.observer = new ResizeObserver(this.resize)
this.observer.observe(this.$el)
this.resize()

View file

@ -27,6 +27,7 @@ if ($_['always-displayed']) {
window.topMenuApps = <?php echo json_encode($_['top-menu-apps']), "\n"; ?>
window.topSideMenuApps = <?php echo json_encode($_['top-side-menu-apps']), "\n"; ?>
window.menuAppsOrder = <?php echo json_encode($_['apps-order']), "\n"; ?>
window.topMenuAppsMouseOverHiddenLabel = <?php echo json_encode($_['top-menu-mouse-over-hidden-label']), "\n"; ?>
<?php if ($display === 'big-menu'): ?>
sideMenu.setAttribute('data-bigmenu', '1')