Merge pull request 'fix #164: open apps in new tab does not work' (#166) from feature/issue164 into develop
ci/woodpecker/push/woodpecker Pipeline was successful Details

Reviewed-on: #166
This commit is contained in:
Simon Vieille 2022-11-04 22:17:48 +01:00
commit 0cec77154a
2 changed files with 5 additions and 2 deletions

View File

@ -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()

View File

@ -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'): ?>