Remove some files & trying to make the desktop look more fun & I'm going

to sleep now.
This commit is contained in:
yuanhau 2025-05-22 00:09:01 +08:00
parent c8429ee1a3
commit 109a39f6e9
12 changed files with 458 additions and 119 deletions

View file

@ -176,53 +176,6 @@ const associAppWindow = [
},
];
/*
const keyboardShortcuts = {
'Meta+k': {
action: () => toggleMenu(),
description: 'Toggle menu'
},
'Meta+q': {
action: () => router.push(localePath("/home")),
description: 'Quit to home'
},
'Meta+w': {
action: () => closeWindow(activeWindows.value[activeWindows.value.length - 1]?.id),
description: 'Close current window'
},
'Meta+t': {
action: () => findAndOpenWindow('tty'),
description: 'Open terminal'
},
}
// Keyboard shortcuts
const handleKeyboardActions = (e: KeyboardEvent) => {
const key = [
e.metaKey ? "Meta": "",
e.ctrlKey ? "Ctrl": "",
e.shiftKey ? "Shift": "",
e.altKey ? "Alt": "",
e.key.toLowerCase()
].filter(Boolean).join('+')
const shortcut = keyboardShortcuts[key];
if (shortcut) {
console.log(`Shortcut triggered: ${key}`);
e.preventDefault()
shortcut.action()
}
}
onMounted(() => {
window.addEventListener('keydown', handleKeyboardActions)
});
onUnmounted(() => {
window.removeEventListener('keydown', handleKeyboardActions)
});
*/
// Date
const currentDate = ref(
new Date().toLocaleDateString("zh-TW", {
@ -385,13 +338,6 @@ const openNewWindowViaApp = (windowId: string) => {
}, 1000);
};
const maxWindow = (windowUUId: string) => {
const windowIndex = activeWindows.value.findIndex(
(window) => window.absoluteId === windowUUId,
);
console.log(windowIndex);
};
const toggleMinWindow = (windowUUId: string) => {
const windowIndex = "";
};
@ -557,7 +503,6 @@ watchEffect((cleanupFn) => {
:width="window.width"
:height="window.height"
@click="obtainTopWindowPosition(window.id)"
@maximize="maxWindow(window.absoluteId)"
:black="window.black"
>
<Suspense>