feat(saves): add one-click online data discovery and cache cleanup

Add user-initiated read-only discovery of local online client settings, copy selected files into the offline copy's staging directory before preview/import, clear the offline client's local cache for the imported account, and refresh save summaries after import.
This commit is contained in:
N0VAN0M4LY committed 2026-11-30 16:51:52 +08:00
1 parent f39d7b05c1
commit db84971823
8 files changed
+261 -25

No files matched your search

@@ -14,7 +14,13 @@ export type SaveTask = Location & (
| { readonly operation: 'editAccount'; readonly userId: string; readonly edits: AccountEdits }
| { readonly operation: 'edit'; readonly userId: string; readonly values: CurrencyEdits }
| { readonly operation: 'previewOfficial'; readonly paths: readonly string[]; readonly includeUsedVehicles: boolean }
| { readonly operation: 'importOfficial'; readonly paths: readonly string[]; readonly userId: string; readonly options: OfficialImportOptions }
| {
readonly operation: 'importOfficial';
readonly paths: readonly string[];
readonly userId: string;
readonly options: OfficialImportOptions;
readonly offlineClientCacheFolder?: string;
}
| { readonly operation: 'readResearch'; readonly userId: string; readonly branch?: ResearchBranch }
| { readonly operation: 'editResearch'; readonly userId: string; readonly branch: ResearchBranch; readonly action: ResearchOperation }
| { readonly operation: 'remove'; readonly userId: string }