From e4d2b4840acdac18a04a666b1487bb6c1363981e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Wed, 14 May 2025 22:10:31 +0800 Subject: [PATCH] It works now :D --- components/app/windows/aboutNewsOrg.vue | 1 + components/app/windows/sources.vue | 1 + pages/app/desktop/index.vue | 13 ++++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/app/windows/aboutNewsOrg.vue b/components/app/windows/aboutNewsOrg.vue index ce24194..c5d6004 100644 --- a/components/app/windows/aboutNewsOrg.vue +++ b/components/app/windows/aboutNewsOrg.vue @@ -46,6 +46,7 @@ onMounted(() => {

diff --git a/components/app/windows/sources.vue b/components/app/windows/sources.vue index 16cfaba..ad5117b 100644 --- a/components/app/windows/sources.vue +++ b/components/app/windows/sources.vue @@ -64,6 +64,7 @@ onMounted(async () => { :src="imageUrls[item.id] || noImageLogo" alt="Organization Logo" class="w-16 h-16 rounded-xl" + draggable="false" />

{{ item.title }}

{{ item.description }} diff --git a/pages/app/desktop/index.vue b/pages/app/desktop/index.vue index a6404da..2a3479f 100644 --- a/pages/app/desktop/index.vue +++ b/pages/app/desktop/index.vue @@ -248,7 +248,11 @@ onMounted(() => { }) const openWindow = (windowName?: string) => { if (windowName === "leave") { - router.push(localePath("/home")); + if (confirm("Are you sure?")) { + router.push(localePath("/home")); + } else { + return + } } else { if (windowName) findAndOpenWindow(windowName); } @@ -340,10 +344,13 @@ const obtainTopWindowPosition = (windowId: string) => { } }; -const closeWindow = (windowId: string) => { +const closeWindow = (windowId: string, windowAID: string) => { activeWindows.value = activeWindows.value.filter( (window) => window.id !== windowId, ); + currentNavBar.value = currentNavBar.value.filter( + (window) => window.windowAssociated !== windowAID + ) console.log("activeWindows.value", activeWindows.value); }; @@ -508,7 +515,7 @@ watchEffect((cleanupFn) => { v-for="window in activeWindows" :key="window.id" :title="window.title" - @close="closeWindow(window.id)" + @close="closeWindow(window.id, window.absoluteId)" @min="unMinWindow(window.id)" :width="window.width" :height="window.height"