hide app icon in macos dock without real windows

This commit is contained in:
2026-09-04 20:15:26 +08:00
parent ef8af68398
commit ce07be8d28
7 changed files with 138 additions and 48 deletions
+5 -5
View File
@@ -68,21 +68,21 @@
return true;
}
async function hideWindow() {
async function closeWindow() {
try {
await getCurrentWindow().hide();
await getCurrentWindow().close();
} catch (error) {
console.error("failed to hide control panel", error);
console.error("failed to close control panel", error);
}
}
async function confirm() {
if (await applyAll()) await hideWindow();
if (await applyAll()) await closeWindow();
}
function cancel() {
tabs.forEach((tab) => actions[tab.id]?.reset());
void hideWindow();
void closeWindow();
}
</script>