From 8677efaa94c2318b2fbddd4eb99293c269de5f5b Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Thu, 22 Jan 2026 23:59:02 -0300 Subject: [PATCH] portal: tighten onboarding confirmation flow --- frontend/src/views/OnboardingView.vue | 170 +++++++++++++------------- 1 file changed, 86 insertions(+), 84 deletions(-) diff --git a/frontend/src/views/OnboardingView.vue b/frontend/src/views/OnboardingView.vue index dd1a936..752688a 100644 --- a/frontend/src/views/OnboardingView.vue +++ b/frontend/src/views/OnboardingView.vue @@ -187,75 +187,6 @@ -
- -
- -
- - Open Element - -
- -
- - - -
-
Photo guide
@@ -302,14 +233,63 @@

Guide coming soon.

-
+
+ + +
+ +
+ +
@@ -387,6 +367,7 @@ const activeSectionId = ref("vaultwarden"); const guideShots = ref({}); const guidePage = ref({}); const lightboxShot = ref(null); +const confirmingStepId = ref(""); const showPasswordCard = computed(() => Boolean(initialPassword.value || initialPasswordRevealedAt.value)); const passwordRevealLocked = computed(() => Boolean(!initialPassword.value && initialPasswordRevealedAt.value)); @@ -759,6 +740,14 @@ function stepPillClass(step) { return "pill-warn"; } +function isConfirming(step) { + return confirmingStepId.value === step.id; +} + +function confirmLabel(step) { + return isConfirming(step) ? "Confirming..." : "Confirm"; +} + function stepCardClass(step) { return { done: isStepDone(step.id), @@ -986,19 +975,31 @@ async function setStepCompletion(stepId, completed) { async function confirmStep(step) { if (!step || isStepBlocked(step.id) || isStepDone(step.id)) return; - if (step.action === "auto") { - await check(); - return; + confirmingStepId.value = step.id; + try { + if (step.action === "auto") { + await check(); + return; + } + if (step.action === "keycloak_rotate") { + await check(); + return; + } + if (step.action === "element_recovery") { + await verifyElementRecoveryKey(); + return; + } + if (step.action === "confirm") { + await check(); + if (!isStepDone(step.id)) { + await setStepCompletion(step.id, true); + } + return; + } + await setStepCompletion(step.id, true); + } finally { + confirmingStepId.value = ""; } - if (step.action === "keycloak_rotate") { - await requestKeycloakPasswordRotation(); - return; - } - if (step.action === "element_recovery") { - await verifyElementRecoveryKey(); - return; - } - await setStepCompletion(step.id, true); } async function verifyElementRecoveryKey() { @@ -1454,6 +1455,7 @@ button.copy:disabled { .step-card.blocked { opacity: 0.55; + pointer-events: none; } .step-card.done {