Visual improvements

This commit is contained in:
2024-05-24 08:11:47 -04:00
parent ce696a5a04
commit 68a2b8ffff
13 changed files with 441 additions and 162 deletions

View File

@@ -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']);