fix #164: open apps in new tab does not work

pull/166/head
Simon Vieille 4 weeks ago
parent 1d06c1b212
commit 6d7543f381
Signed by: deblan
GPG Key ID: 579388D585F70417
  1. 3
      src/AppMenu.vue
  2. 4
      templates/js/script.php

@ -33,6 +33,7 @@
<a :href="app.href"
:class="{ 'has-unread': app.unread > 0 }"
:aria-label="appLabel(app)"
:target="targetBlankApps.indexOf(app.id) !== -1 ? '_blank' : undefined"
:aria-current="app.active ? 'page' : false">
<img :src="app.icon" alt="">
<div class="app-menu-entry--label">
@ -75,6 +76,7 @@ export default {
apps: null,
appLimit: 0,
observer: null,
targetBlankApps: [],
}
},
mounted() {
@ -93,6 +95,7 @@ export default {
}
})
this.targetBlankApps = window.targetBlankApps
this.observer = new ResizeObserver(this.resize)
this.observer.observe(this.$el)
this.resize()

@ -22,10 +22,10 @@ if ($_['always-displayed']) {
const nextcloud = document.querySelector('#nextcloud')
const isTouchDevice = window.matchMedia("(pointer: coarse)").matches
const targetBlankApps = <?php echo json_encode($_['target-blank-apps']) ?>
window.targetBlankApps = <?php echo json_encode($_['target-blank-apps']), "\n" ?>
window.topMenuApps = <?php echo json_encode($_['top-menu-apps']), "\n"; ?>
window.topSideMenuApps = <?php echo json_encode($_['top-side-menu-apps'])."\n"; ?>
window.topSideMenuApps = <?php echo json_encode($_['top-side-menu-apps']), "\n"; ?>
window.menuAppsOrder = <?php echo json_encode($_['apps-order']), "\n"; ?>
<?php if ($display === 'big-menu'): ?>

Loading…
Cancel
Save