feat(frontend): route quick-add mode to QuickAddOverlay in App.vue

This commit is contained in:
kolaente 2026-03-03 00:03:19 +01:00 committed by kolaente
parent ff4e84a800
commit 9072ca84d5
2 changed files with 37 additions and 16 deletions

View File

@ -1,24 +1,34 @@
<template> <template>
<Ready> <Ready>
<template v-if="showAuthLayout"> <template v-if="isQuickAddMode && authStore.authUser">
<AppHeader /> <QuickAddOverlay />
<ContentAuth />
</template> </template>
<ContentLinkShare v-else-if="authStore.authLinkShare" /> <template v-else-if="isQuickAddMode">
<NoAuthWrapper <div class="quick-add-not-logged-in">
v-else <p>{{ $t('quickActions.notLoggedIn') }}</p>
show-api-config </div>
> </template>
<RouterView /> <template v-else>
</NoAuthWrapper> <template v-if="showAuthLayout">
<AppHeader />
<KeyboardShortcuts v-if="keyboardShortcutsActive" /> <ContentAuth />
</template>
<ContentLinkShare v-else-if="authStore.authLinkShare" />
<NoAuthWrapper
v-else
show-api-config
>
<RouterView />
</NoAuthWrapper>
</template>
<KeyboardShortcuts v-if="keyboardShortcutsActive && !isQuickAddMode" />
<Teleport to="body"> <Teleport to="body">
<AddToHomeScreen /> <AddToHomeScreen v-if="!isQuickAddMode" />
<UpdateNotification /> <UpdateNotification v-if="!isQuickAddMode" />
<Notification /> <Notification />
<DemoMode /> <DemoMode v-if="!isQuickAddMode" />
</Teleport> </Teleport>
</Ready> </Ready>
</template> </template>
@ -46,9 +56,11 @@ import {useBaseStore} from '@/stores/base'
import {useColorScheme} from '@/composables/useColorScheme' import {useColorScheme} from '@/composables/useColorScheme'
import {useBodyClass} from '@/composables/useBodyClass' import {useBodyClass} from '@/composables/useBodyClass'
import QuickAddOverlay from '@/components/quick-actions/QuickAddOverlay.vue'
import AddToHomeScreen from '@/components/home/AddToHomeScreen.vue' import AddToHomeScreen from '@/components/home/AddToHomeScreen.vue'
import DemoMode from '@/components/home/DemoMode.vue' import DemoMode from '@/components/home/DemoMode.vue'
import {AUTH_ROUTE_NAMES} from '@/constants/authRouteNames' import {AUTH_ROUTE_NAMES} from '@/constants/authRouteNames'
import {useQuickAddMode} from '@/composables/useQuickAddMode'
const importAccountDeleteService = () => import('@/services/accountDelete') const importAccountDeleteService = () => import('@/services/accountDelete')
import {success} from '@/message' import {success} from '@/message'
@ -56,6 +68,14 @@ import {success} from '@/message'
const authStore = useAuthStore() const authStore = useAuthStore()
const baseStore = useBaseStore() const baseStore = useBaseStore()
const {isQuickAddMode} = useQuickAddMode()
// Make the Electron frameless window transparent
if (isQuickAddMode) {
document.documentElement.style.background = 'transparent'
document.body.style.background = 'transparent'
}
const route = useRoute() const route = useRoute()
const showAuthLayout = computed(() => authStore.authUser && typeof route.name === 'string' && !AUTH_ROUTE_NAMES.has(route.name)) const showAuthLayout = computed(() => authStore.authUser && typeof route.name === 'string' && !AUTH_ROUTE_NAMES.has(route.name))

View File

@ -1243,6 +1243,7 @@
"markAllReadSuccess": "Successfully marked all notifications as read." "markAllReadSuccess": "Successfully marked all notifications as read."
}, },
"quickActions": { "quickActions": {
"notLoggedIn": "Please log in to the main Vikunja window first.",
"commands": "Commands", "commands": "Commands",
"placeholder": "Type a command or search…", "placeholder": "Type a command or search…",
"hint": "You can use {project} to limit the search to a project. Combine {project} or {label} (labels) with a search query to search for a task with these labels or on that project. Use {assignee} to only search for teams.", "hint": "You can use {project} to limit the search to a project. Combine {project} or {label} (labels) with a search query to search for a task with these labels or on that project. Use {assignee} to only search for teams.",