diff --git a/desktop/src/features/onboarding/ui/DownloadKeyStep.tsx b/desktop/src/features/onboarding/ui/DownloadKeyStep.tsx index fb4a3c1fe..b99fcf509 100644 --- a/desktop/src/features/onboarding/ui/DownloadKeyStep.tsx +++ b/desktop/src/features/onboarding/ui/DownloadKeyStep.tsx @@ -22,7 +22,7 @@ type DownloadKeyStepProps = { * the backup-test progress. */ session: EncryptedBackupSession; - onNext: () => void; + onBack: () => void; }; /** @@ -33,16 +33,12 @@ type DownloadKeyStepProps = { export function DownloadKeyStep({ direction, session, - onNext, + onBack, }: DownloadKeyStepProps) { const reduceMotion = useReducedMotion() ?? false; - // True once the encrypted payload exists — the create button (living in the - // footer's primary slot) disappears with the form, so Next takes its place. + // Once the encrypted payload is saved, the creator advances to its guided + // backup test while this surface keeps its own navigation. const hasCreated = session.created; - // True once the user has passed the backup test — until then Next stays - // disabled and "Skip for now" remains the escape hatch. - const hasVerified = session.verified; - // Footer slot the creator portals its "Download" button into. const [createButtonSlot, setCreateButtonSlot] = React.useState(null); @@ -90,56 +86,22 @@ export function DownloadKeyStep({ - {hasCreated ? ( - hasVerified ? ( - - ) : ( - /* No disabled Next while the test is unfinished — skipping is - the only way forward until verification succeeds. */ - - ) - ) : ( - /* Relative row keeps the Download CTA truly centered while Skip - hangs off its right edge without shifting the center. */ -
-
- -
- )} - {hasCreated ? null : ( -

- You can back up your key anytime in Settings → Profile → - Identity. -

+
)} + ); diff --git a/desktop/src/features/onboarding/ui/EncryptedBackupCreator.tsx b/desktop/src/features/onboarding/ui/EncryptedBackupCreator.tsx index ab02838cf..1c567bb7e 100644 --- a/desktop/src/features/onboarding/ui/EncryptedBackupCreator.tsx +++ b/desktop/src/features/onboarding/ui/EncryptedBackupCreator.tsx @@ -221,8 +221,8 @@ type EncryptedBackupCreatorProps = { /** "spotlight" is the onboarding treatment; "boxed" fits settings cards. */ variant?: "spotlight" | "boxed"; /** - * When set, the "Download" button is portaled into this element - * (e.g. the onboarding footer's primary slot) instead of rendering inline. + * When set, the "Download" button is portaled into this element instead of + * rendering inline. */ createButtonPortal?: HTMLElement | null; /** Extra classes for the "Download" button. */ diff --git a/desktop/src/features/onboarding/ui/MachineOnboardingFlow.tsx b/desktop/src/features/onboarding/ui/MachineOnboardingFlow.tsx index c9ac67b7b..ddea7a605 100644 --- a/desktop/src/features/onboarding/ui/MachineOnboardingFlow.tsx +++ b/desktop/src/features/onboarding/ui/MachineOnboardingFlow.tsx @@ -271,7 +271,11 @@ export function MachineOnboardingFlow({ backupSubview === "password" ? ( setPage("setup")} + onBack={() => { + setBackupDirection("backward"); + setReturningFromSecurity(false); + setBackupSubview("options"); + }} session={backupSession} /> ) : (