0
0
Fork 0

Updated drawer state

This commit is contained in:
Joan Sanchez 2023-02-28 15:00:51 +01:00
parent 2000081a61
commit 0fe96e9455
3 changed files with 18 additions and 7 deletions

View File

@ -57,7 +57,13 @@ onMounted(() => stateStore.setMounted());
</q-tooltip>
<PinnedModules />
</q-btn>
<q-btn flat @click="$emit('onToggleRightDrawer')" round dense icon="menu">
<q-btn
flat
@click="stateStore.toggleRightDrawer()"
round
dense
icon="menu"
>
<q-tooltip bottom anchor="bottom right">
{{ t('globals.collapseMenu') }}
</q-tooltip>

View File

@ -12,13 +12,13 @@ import TeleportSlot from 'components/ui/TeleportSlot.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import ClaimFilter from './ClaimFilter.vue';
const state = useStateStore();
const stateStore = useStateStore();
const router = useRouter();
const quasar = useQuasar();
const { t } = useI18n();
onMounted(() => state.toggleRightDrawer());
onUnmounted(() => state.toggleRightDrawer());
onMounted(() => stateStore.toggleRightDrawer());
onUnmounted(() => stateStore.toggleRightDrawer());
function stateColor(code) {
if (code === 'pending') return 'green';

View File

@ -1,11 +1,11 @@
<script setup>
import { onMounted, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useState } from 'src/composables/useState';
import LeftMenu from 'components/LeftMenu.vue';
import { useStateStore } from 'stores/useStateStore';
import { useNavigationStore } from 'src/stores/useNavigationStore';
const state = useState();
const stateStore = useStateStore();
const navigation = useNavigationStore();
const { t } = useI18n();
@ -15,7 +15,12 @@ const pinnedModules = computed(() => navigation.getPinnedModules());
</script>
<template>
<q-drawer v-model="state.drawer.value" show-if-above :width="256" :breakpoint="800">
<q-drawer
v-model="stateStore.leftDrawer"
show-if-above
:width="256"
:breakpoint="1000"
>
<q-scroll-area class="fit text-grey-8">
<LeftMenu />
</q-scroll-area>