fix: top navigation not usable
Some checks failed
continuous-integration/drone/pr Build is failing

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> <template>
<div> <div class="content-auth" :class="{'modal-active': modalActive}">
<BaseButton <BaseButton
v-if="menuActive" v-if="menuActive"
@click="$store.commit('menuActive', false)" @click="$store.commit('menuActive', false)"
@ -124,12 +124,12 @@ function useRouteWithModal() {
const {routeWithModal, currentModal, closeModal} = useRouteWithModal() const {routeWithModal, currentModal, closeModal} = useRouteWithModal()
const store = useStore() const store = useStore()
const background = computed(() => store.state.background) const background = computed(() => store.state.background)
const blurHash = computed(() => store.state.blurHash) const blurHash = computed(() => store.state.blurHash)
const menuActive = computed(() => store.state.menuActive) const menuActive = computed(() => store.state.menuActive)
const modalActive = computed(() => store.state.modalActive)
function showKeyboardShortcuts() { function showKeyboardShortcuts() {
store.commit(KEYBOARD_SHORTCUTS_ACTIVE, true) 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(); @include modal-transition();
</style> </style>

View File

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

View File

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