feat(frontend): add QuickAddOverlay component for quick-entry window

This commit is contained in:
kolaente 2026-03-03 00:01:28 +01:00 committed by kolaente
parent d72a3a8c0d
commit ff4e84a800
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,37 @@
<template>
<div class="quick-add-overlay">
<QuickActions />
</div>
</template>
<script setup lang="ts">
import {watch, onMounted} from 'vue'
import QuickActions from '@/components/quick-actions/QuickActions.vue'
import {useBaseStore} from '@/stores/base'
const baseStore = useBaseStore()
onMounted(() => {
baseStore.setQuickActionsActive(true)
})
// When QuickActions closes (Escape, task created, etc.), tell Electron to hide the window
watch(() => baseStore.quickActionsActive, (active) => {
if (!active) {
if (typeof window.quickEntry?.close === 'function') {
window.quickEntry.close()
}
}
})
</script>
<style lang="scss" scoped>
.quick-add-overlay {
position: fixed;
inset: 0;
display: flex;
align-items: flex-start;
justify-content: center;
}
</style>

5
frontend/src/types/quick-entry.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
interface Window {
quickEntry?: {
close: () => void
}
}