mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Remove some files & trying to make the desktop look more fun & I'm going
to sleep now.
This commit is contained in:
parent
c8429ee1a3
commit
109a39f6e9
12 changed files with 458 additions and 119 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue