add target _blank when the option is enabled
This commit is contained in:
+3
-1
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<ul class="side-menu-apps-list">
|
||||
<li v-for="app in apps" v-bind:class="{'side-menu-app': true, 'active': app.active}">
|
||||
<a v-bind:href="app.href" v-bind:title="app.name">
|
||||
<a v-bind:href="app.href" :target="targetBlank ? '_blank' : undefined" v-bind:title="app.name">
|
||||
<span class="side-menu-app-icon" v-html="app.icon"></span>
|
||||
<span class="side-menu-app-text" v-html="app.name"></span>
|
||||
</a>
|
||||
@@ -45,6 +45,7 @@ export default {
|
||||
apps: [],
|
||||
logo: null,
|
||||
forceLightIcon: false,
|
||||
targetBlank: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -119,6 +120,7 @@ export default {
|
||||
this.retrieveApps()
|
||||
this.retrieveLogo()
|
||||
this.forceLightIcon = document.querySelector('#side-menu-container').getAttribute('data-forcelighticon') == 1;
|
||||
this.targetBlank = document.querySelector('#side-menu-container').getAttribute('data-targetblank') == 1;
|
||||
|
||||
const menu = document.querySelector('#appmenu')
|
||||
|
||||
|
||||
+4
-1
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<ul class="side-menu-apps-list">
|
||||
<li v-bind:class="{'side-menu-app': true, 'active': activeApp === appId}" v-for="(app, appId) in category.apps">
|
||||
<a v-bind:href="app.href" v-bind:title="app.name">
|
||||
<a v-bind:href="app.href" :target="targetBlank ? '_blank' : undefined" v-bind:title="app.name">
|
||||
<img class="side-menu-app-icon" v-bind:src="app.icon"></span>
|
||||
<span class="side-menu-app-text" v-html="app.name"></span>
|
||||
</a>
|
||||
@@ -50,6 +50,7 @@ export default {
|
||||
return {
|
||||
items: [],
|
||||
activeApp: null,
|
||||
targetBlank: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -79,6 +80,8 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.targetBlank = document.querySelector('#side-menu-container').getAttribute('data-targetblank') == 1;
|
||||
|
||||
this.retrieveApps()
|
||||
this.retrieveActiveApp()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user