Add desktop multi-window support (#6463)

This commit is contained in:
Anthony Stirling
2026-05-29 19:35:54 +01:00
committed by GitHub
parent 28b81828b5
commit 2b0905887b
15 changed files with 571 additions and 70 deletions
@@ -1,14 +1,20 @@
import { useSaveShortcut } from "@app/hooks/useSaveShortcut";
import { useExitWarning } from "@app/hooks/useExitWarning";
import { useNewWindowShortcut } from "@app/hooks/useNewWindowShortcut";
import { useOpenWindowFiles } from "@app/hooks/useOpenWindowFiles";
/**
* Desktop-only component that sets up keyboard shortcuts and exit warnings
* - Ctrl/Cmd+S to save selected files
* - Ctrl/Cmd+N to open an empty new window
* - Loads files queued for this window ("Open in new window" from My Files)
* - Warning on app exit if unsaved files
* Renders nothing, just sets up the listeners
*/
export function SaveShortcutListener() {
useSaveShortcut();
useNewWindowShortcut();
useOpenWindowFiles();
useExitWarning();
return null;
}