feat(saves): add save archives and copy transfers
This commit is contained in:
1 parent
073a907617
commit
d0a767e692
19 files changed
+660
-25
No files matched your search
@@ -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).
|
||||
|
||||
Reference in new issue
Block a user