fix: top navigation not usable
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2022-04-02 14:38:52 +02:00
parent f8ca1c47a9
commit 7ff8daf6e2
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 35 additions and 21 deletions

View File

@ -1,5 +1,5 @@
<template>
<div>
<div class="content-auth" :class="{'modal-active': modalActive}">
<BaseButton
v-if="menuActive"
@click="$store.commit('menuActive', false)"
@ -46,7 +46,7 @@
variant="scrolling"
class="task-detail-view-modal"
>
<component :is="currentModal" />
<component :is="currentModal"/>
</modal>
</transition>
@ -119,17 +119,17 @@ function useRouteWithModal() {
}
}
return { routeWithModal, currentModal, closeModal }
return {routeWithModal, currentModal, closeModal}
}
const { routeWithModal, currentModal, closeModal } = useRouteWithModal()
const {routeWithModal, currentModal, closeModal} = useRouteWithModal()
const store = useStore()
const background = computed(() => store.state.background)
const blurHash = computed(() => store.state.blurHash)
const menuActive = computed(() => store.state.menuActive)
const modalActive = computed(() => store.state.modalActive)
function showKeyboardShortcuts() {
store.commit(KEYBOARD_SHORTCUTS_ACTIVE, true)
@ -303,5 +303,14 @@ store.dispatch('labels/loadAllLabels')
}
}
.content-auth {
position: relative;
z-index: 1;
&.modal-active {
z-index: unset;
}
}
@include modal-transition();
</style>

View File

@ -64,6 +64,9 @@
import BaseButton from '@/components/base/BaseButton.vue'
import {ref, watch} from 'vue'
import {useScrollLock} from '@vueuse/core'
import {useStore} from 'vuex'
const store = useStore()
const props = withDefaults(defineProps<{
enabled?: boolean,
@ -86,6 +89,7 @@ watch(
() => props.enabled,
enabled => {
scrollLock.value = enabled
store.commit('modalActive', enabled)
},
{
immediate: true,

View File

@ -51,6 +51,7 @@ export const store = createStore({
menuActive: true,
keyboardShortcutsActive: false,
quickActionsActive: false,
modalActive: false,
},
mutations: {
[LOADING](state, loading) {
@ -89,8 +90,8 @@ export const store = createStore({
[BLUR_HASH](state, blurHash) {
state.blurHash = blurHash
},
vikunjaReady(state, ready) {
state.vikunjaReady = ready
modalActive(state, active) {
state.modalActive = active
},
},
actions: {