Visual improvements
This commit is contained in:
@@ -31,8 +31,7 @@
|
||||
clickable
|
||||
v-ripple
|
||||
:to="sublink.to"
|
||||
class="q-ml-md"
|
||||
v-if="hasRole(sublink.requiredRoles)">
|
||||
class="q-ml-md">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="sublink.icon" />
|
||||
</q-item-section>
|
||||
@@ -57,17 +56,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { defineComponent } from 'vue';
|
||||
import { enabledLinks } from 'src/router/navlinks.js';
|
||||
import { useAuthStore } from 'src/stores/auth';
|
||||
import { logout } from 'boot/appwrite';
|
||||
|
||||
const authStore = useAuthStore();
|
||||
|
||||
function hasRole(roles: string[] | undefined) {
|
||||
if (roles === undefined) return true;
|
||||
const hasRole = authStore.hasRequiredRole(roles);
|
||||
return hasRole;
|
||||
}
|
||||
|
||||
defineProps(['drawer']);
|
||||
defineEmits(['drawer-toggle']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user