feat(launcher): remember last selected directory in file and folder pickers

Persist per-category dialog directories under userData/dialog-paths.json and resolve existing parent fallbacks for folder pickers, save archive import/export, online backup selection, and mod preset/folder dialogs.
This commit is contained in:
N0VAN0M4LY committed 2026-12-04 19:55:04 +08:00
1 parent 8f1d175d55
commit b3211b89cd
6 files changed
+226 -12

No files matched your search

+5 -2
View File
@@ -65,8 +65,11 @@ export const ipcContract = {
output: z.object({ path: z.string().nullable() }),
},
'dialog:pickFolder': {
/** The dialog title, already translated by the window. */
input: z.object({ title: z.string().optional() }),
/** The dialog title, already translated by the window, and an optional starting path. */
input: z.object({
title: z.string().optional(),
defaultPath: z.string().optional(),
}),
/** The chosen folder, or null when the player cancelled. */
output: z.object({ path: z.string().nullable() }),
},