add option to keep an app in the top and side menu

This commit is contained in:
Simon Vieille
2022-01-12 12:40:17 +01:00
parent 50c65811a6
commit d34b41ba94
13 changed files with 200 additions and 99 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ const updateTopMenu = function() {
continue
}
if (topMenuApps.indexOf(dataId) === -1) {
if (topMenuApps.indexOf(dataId) === -1 && topSideMenuApps.indexOf(dataId) === -1) {
app.classList.add('hidden')
app.classList.add('app-hidden')
} else {
+3 -2
View File
@@ -186,8 +186,9 @@ if ($_['always-displayed']) {
nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud.nextSibling)
<?php endif; ?>
<?php if (!empty($_['top-menu-apps'])): ?>
const topMenuApps = <?php echo json_encode($_['top-menu-apps']); ?>
<?php if (!empty($_['top-menu-apps']) || !empty($_['top-side-menu-apps'])): ?>
const topMenuApps = <?php echo json_encode($_['top-menu-apps']), "\n"; ?>
const topSideMenuApps = <?php echo json_encode($_['top-side-menu-apps']); ?>
<?php require_once __DIR__.'/_topMenuApps.js'; ?>
<?php endif; ?>