Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -129,9 +129,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { Dialog } from 'quasar'
|
||||
import { ref, computed, onMounted, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { Dialog, useQuasar } from 'quasar'
|
||||
|
||||
import { useAuthStore } from 'stores/authStore'
|
||||
import { usePermissionStore } from 'stores/permissionStore'
|
||||
@@ -140,13 +140,15 @@ import { usePermissionStore } from 'stores/permissionStore'
|
||||
/* ================= STORES ================= */
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const $q = useQuasar()
|
||||
const auth = useAuthStore()
|
||||
const perm = usePermissionStore()
|
||||
|
||||
|
||||
/* ================= UI ================= */
|
||||
|
||||
const leftDrawerOpen = ref(true)
|
||||
const leftDrawerOpen = ref(!$q.screen.lt.md)
|
||||
|
||||
function toggleLeftDrawer () {
|
||||
leftDrawerOpen.value = !leftDrawerOpen.value
|
||||
@@ -172,8 +174,18 @@ onMounted(async () => {
|
||||
if (!perm.loaded) {
|
||||
await perm.fetchPermissions()
|
||||
}
|
||||
leftDrawerOpen.value = !$q.screen.lt.md
|
||||
})
|
||||
|
||||
watch(
|
||||
() => route.fullPath,
|
||||
() => {
|
||||
if ($q.screen.lt.md) {
|
||||
leftDrawerOpen.value = false
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
/* ================= MENU CONFIG ================= */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user