added API link for drupal admins in menu

This commit is contained in:
2023-03-07 14:38:35 +01:00
parent 8efc6fd6f9
commit 6776b8f1d8
2 changed files with 65 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ export default {
return { userStore }
},
computed: {
...mapState(UserStore,['isloggedin', 'mail', 'name'])
...mapState(UserStore,['isloggedin', 'isAdmin', 'mail', 'name'])
},
methods: {
// ...mapActions({
@@ -30,10 +30,16 @@ export default {
<template>
<div id="user-tools">
<a class="mdi mdi-account" href="/user">
<a class="mdi mdi-account" href="/api/user">
<span>{{ name }}</span>
<!-- <span v-else>{{ mail }}</span> -->
</a><br/>
<a
v-if="isAdmin"
class="api"
href="/api/admin/content/concernements">
<span>API</span>
</a><br/>
<a href="/user/logout"
@click.prevent="onLogout()"
class="mdi mdi-logout"