feat(frontend): listen for cross-window task creation via BroadcastChannel

This commit is contained in:
kolaente 2026-03-03 00:03:21 +01:00 committed by kolaente
parent 8dc96d61bd
commit 92cc070b1e
1 changed files with 11 additions and 1 deletions

View File

@ -72,7 +72,7 @@
</template>
<script lang="ts" setup>
import {watch, computed} from 'vue'
import {watch, computed, onBeforeUnmount} from 'vue'
import {useRoute} from 'vue-router'
import Navigation from '@/components/home/Navigation.vue'
@ -140,6 +140,16 @@ labelStore.loadAllLabels()
const projectStore = useProjectStore()
projectStore.loadAllProjects()
// Listen for task creation from the quick-entry window
const taskUpdateChannel = new BroadcastChannel('vikunja-task-updates')
taskUpdateChannel.onmessage = () => {
// Handled by later commits (e.g. open task in main window)
}
onBeforeUnmount(() => {
taskUpdateChannel.close()
})
</script>
<style lang="scss" scoped>