forked from deblan/side_menu
Merge pull request 'fix #164: open apps in new tab does not work' (#166) from feature/issue164 into develop
Reviewed-on: deblan/side_menu#166
This commit is contained in:
commit
0cec77154a
|
@ -33,6 +33,7 @@
|
||||||
<a :href="app.href"
|
<a :href="app.href"
|
||||||
:class="{ 'has-unread': app.unread > 0 }"
|
:class="{ 'has-unread': app.unread > 0 }"
|
||||||
:aria-label="appLabel(app)"
|
:aria-label="appLabel(app)"
|
||||||
|
:target="targetBlankApps.indexOf(app.id) !== -1 ? '_blank' : undefined"
|
||||||
:aria-current="app.active ? 'page' : false">
|
:aria-current="app.active ? 'page' : false">
|
||||||
<img :src="app.icon" alt="">
|
<img :src="app.icon" alt="">
|
||||||
<div class="app-menu-entry--label">
|
<div class="app-menu-entry--label">
|
||||||
|
@ -75,6 +76,7 @@ export default {
|
||||||
apps: null,
|
apps: null,
|
||||||
appLimit: 0,
|
appLimit: 0,
|
||||||
observer: null,
|
observer: null,
|
||||||
|
targetBlankApps: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -93,6 +95,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.targetBlankApps = window.targetBlankApps
|
||||||
this.observer = new ResizeObserver(this.resize)
|
this.observer = new ResizeObserver(this.resize)
|
||||||
this.observer.observe(this.$el)
|
this.observer.observe(this.$el)
|
||||||
this.resize()
|
this.resize()
|
||||||
|
|
|
@ -22,10 +22,10 @@ if ($_['always-displayed']) {
|
||||||
const nextcloud = document.querySelector('#nextcloud')
|
const nextcloud = document.querySelector('#nextcloud')
|
||||||
|
|
||||||
const isTouchDevice = window.matchMedia("(pointer: coarse)").matches
|
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.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"; ?>
|
window.menuAppsOrder = <?php echo json_encode($_['apps-order']), "\n"; ?>
|
||||||
|
|
||||||
<?php if ($display === 'big-menu'): ?>
|
<?php if ($display === 'big-menu'): ?>
|
||||||
|
|
Loading…
Reference in a new issue