feat(saves): add save archives and copy transfers

This commit is contained in:
N0VAN0M4LY committed 2026-11-29 15:55:23 +08:00
1 parent 073a907617
commit d0a767e692
19 files changed
+660 -25

No files matched your search

+10
View File
@@ -78,6 +78,16 @@ export class AccountStore {
return account;
}
remove(userId: string): boolean {
const accounts = this.#file.accounts.filter((account) => account.userId !== userId);
if (accounts.length === this.#file.accounts.length) return false;
const file = { ...this.#file, accounts };
writeFileAtomic(this.#path, JSON.stringify(file, null, 2));
this.#file = file;
if (this.#lastSignedInUserId === userId) this.#lastSignedInUserId = undefined;
return true;
}
/**
* The account that most recently signed in during this service run (for defaulting the initial
* read-only account dropdown in the built-in browser; never used as a fallback on mutations).