📚 The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
events: change window -> document
Smaug67397442c499ce5d
diff --git a/frontend/app/components/BackToTop.vue b/frontend/app/components/BackToTop.vueindex efebc654..600a554a 100644--- a/frontend/app/components/BackToTop.vue+++ b/frontend/app/components/BackToTop.vue@@ -1,5 +1,5 @@<template>- <div v-if="show" class="back-to-top" @click="scrollToTop"/>+ <div v-if="show" class="back-to-top" @click="scrollToTop" /></template><script setup lang="ts">@@ -11,9 +11,9 @@ const onScroll = () => (scrollTop.value = getScrollTop());onMounted(() => {scrollTop.value = getScrollTop();- window.addEventListener('scroll', onScroll);+ document.addEventListener('scroll', onScroll);});-onUnmounted(() => window.removeEventListener('scroll', onScroll));+onUnmounted(() => document.removeEventListener('scroll', onScroll));</script><style scoped lang="scss">diff --git a/frontend/app/components/CommandCenter.vue b/frontend/app/components/CommandCenter.vueindex ce10c8b5..884d0072 100644--- a/frontend/app/components/CommandCenter.vue+++ b/frontend/app/components/CommandCenter.vue@@ -170,11 +170,11 @@ onMounted(() => {document.addEventListener('keydown', handleGlobalKeydown);const openListener = () => openSearch();- window.addEventListener('global-search-open', openListener as EventListener);+ document.addEventListener('global-search-open', openListener as EventListener);onUnmounted(() => {document.removeEventListener('keydown', handleGlobalKeydown);- window.removeEventListener('global-search-open', openListener as EventListener);+ document.removeEventListener('global-search-open', openListener as EventListener);});});diff --git a/frontend/app/components/QuickSearch.vue b/frontend/app/components/QuickSearch.vueindex b9d785ce..045e587d 100644--- a/frontend/app/components/QuickSearch.vue+++ b/frontend/app/components/QuickSearch.vue@@ -51,8 +51,8 @@ const handleTab = (event: KeyboardEvent) => {focusableItems[nextIndex]?.focus();};-onMounted(() => window.addEventListener('keydown', handleSearchShortCut));-onBeforeUnmount(() => window.removeEventListener('keydown', handleSearchShortCut));+onMounted(() => document.addEventListener('keydown', handleSearchShortCut));+onBeforeUnmount(() => document.removeEventListener('keydown', handleSearchShortCut));const handleSearchShortCut = (e: KeyboardEvent) => {if (e.ctrlKey && e.key === 'q') {if (!showSearchModal.value) {diff --git a/frontend/app/pages/(public)/index.vue b/frontend/app/pages/(public)/index.vueindex 1b8ce80c..5dfa7b50 100644--- a/frontend/app/pages/(public)/index.vue+++ b/frontend/app/pages/(public)/index.vue@@ -91,7 +91,7 @@ function handleParallax(e: MouseEvent) {}onMounted(() => {- window.addEventListener('mousemove', handleParallax);+ document.addEventListener('mousemove', handleParallax);const observer = new IntersectionObserver(entries => {entries.forEach(entry => {@@ -102,7 +102,7 @@ onMounted(() => {);document.querySelectorAll('.reveal').forEach(el => observer.observe(el));onUnmounted(() => {- window.removeEventListener('mousemove', handleParallax);+ document.removeEventListener('mousemove', handleParallax);observer.disconnect();});});diff --git a/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue b/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vueindex 58ef9d16..b236f3df 100644--- a/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue+++ b/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue@@ -79,8 +79,8 @@ const headers_tree = computed(() => buildTree(getHeaders(headers.value)));const marker = ref<HTMLElement>();-onMounted(() => window.addEventListener('scroll', updateActiveHeader, { passive: true }));-onBeforeUnmount(() => window.removeEventListener('scroll', updateActiveHeader));+onMounted(() => document.addEventListener('scroll', updateActiveHeader, { passive: true }));+onBeforeUnmount(() => document.removeEventListener('scroll', updateActiveHeader));function updateActiveHeader() {const scrollPosition = window.scrollY + window.innerHeight / 4; // quart de la hauteur écran