feat: replace setup checklist with a five-screen onboarding flow
Generate-or-recover an identity, establish server trust, then bind an address — each its own screen with no bleed-through, replacing the old intro/restore cards plus the post-hoc setup checklist banner.
This commit is contained in:
parent
1710d7b144
commit
fb0ca5c8cc
4 changed files with 313 additions and 244 deletions
|
|
@ -165,7 +165,7 @@ export function setLeaveOnServer(value) {
|
|||
}
|
||||
|
||||
// The user's own word that the master is written down somewhere else. Nothing
|
||||
// can verify it, so it only drives the setup checklist — never a guard.
|
||||
// can verify it, so it is a settings-panel reminder, never a guard.
|
||||
export function masterSaved() {
|
||||
return load().masterSaved ?? false;
|
||||
}
|
||||
|
|
@ -174,14 +174,19 @@ export function setMasterSaved(value) {
|
|||
update(state => { state.masterSaved = value; });
|
||||
}
|
||||
|
||||
// Whether the setup checklist was dismissed. Remaining steps stay reachable
|
||||
// from settings, so hiding it is a preference, not a loss.
|
||||
export function setupDismissed() {
|
||||
return load().setupDismissed ?? false;
|
||||
}
|
||||
|
||||
export function setSetupDismissed(value) {
|
||||
update(state => { state.setupDismissed = value; });
|
||||
// Undoes setIdentity()/restoreMaster(): onboarding's "back"/"start over",
|
||||
// before anything is bound to an account. Pins and contacts are left alone —
|
||||
// server trust is not identity-scoped.
|
||||
export function discardIdentity() {
|
||||
if (account()) throw new Error("already bound to an account; log out instead");
|
||||
update(state => {
|
||||
delete state.master;
|
||||
delete state.rotations;
|
||||
delete state.syncOk;
|
||||
delete state.afterTime;
|
||||
delete state.afterId;
|
||||
delete state.masterSaved;
|
||||
});
|
||||
}
|
||||
|
||||
export function cursor() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue