It works now :D

This commit is contained in:
yuanhau 2025-05-14 22:10:31 +08:00
parent 861c6b8e35
commit e4d2b4840a
3 changed files with 12 additions and 3 deletions

View file

@ -46,6 +46,7 @@ onMounted(() => {
<img
:src="fetchNewsOrgInfo?.logoUrl"
class="w-48 h-48 rounded-l-3xl object-cover p-0 m-0"
draggable="false"
/>
<div class="flex flex-col gap-3 text-left">
<h1 class="text-4xl font-bold m-3 text-left">

View file

@ -64,6 +64,7 @@ onMounted(async () => {
:src="imageUrls[item.id] || noImageLogo"
alt="Organization Logo"
class="w-16 h-16 rounded-xl"
draggable="false"
/>
<h1>{{ item.title }}</h1>
<span>{{ item.description }}</span>

View file

@ -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"