Right after backup the phrase is already on screen, so the reveal button saying "Show phrase again" read as redundant. It is now a toggle: "Hide phrase" while the phrase is shown, "Show recovery phrase" (with the passkey confirm) when it is not — so both the post-backup and reloaded states read correctly.
- commit
- bd5c623d9eb12c63386fff0894018bd8558677dc
- parent
- 9f9992c08428e433f043a448bb0393ad42234eca
- author
- Dami <dami.etoile@gmail.com>
| M | apps/ | 15 | ++++++++------- |
| M | package/ | 2 | +- |
@@ -121,17 +121,18 @@ export default function AccountGate() {
121121 <button122122 type="button"123123 disabled={disabled}124- onClick={() =>124+ onClick={() => {125+ if (phrase) {126+ setPhrase(null);127+ return;128+ }125129 run("reveal", async () => {126130 await confirmPhraseAccess();127131 setPhrase(await revealRecoveryPhrase());128- })}132+ });133+ }}129134 >130- {busy === "reveal"131- ? "Revealing…"132- : phrase133- ? "Show phrase again"134- : "Show recovery phrase"}135+ {busy === "reveal" ? "Revealing…" : phrase ? "Hide phrase" : "Show recovery phrase"}135136 </button>136137 {!session.phraseGuarded && (137138 <button@@ -38,7 +38,7 @@
3838 "src/_lofi/use-device-capabilities.ts": "f7c7b2321b400d8076a5347e0f1ff2924623535979d48a2d94a69f825b93841e",3939 "src/app.ts": "7e65c5308f645164357b02944d1e265f2be942686a634c552add14cfb8fd384f",4040 "src/env.d.ts": "b44daed05ec5cdfacfd8d8acf7866974b5f6b8db923ab53bd244419093c719da",41- "src/islands/AccountGate.tsx": "11c7d59edc61400c0e15592112f74dd4d3b33ba3e67a1263d51b30389b5b0482",41+ "src/islands/AccountGate.tsx": "7355d496180ee45a6144f10b96d1ec39e2d4427ffeab6e574c9b78a601480138",4242 "src/islands/TaskList.tsx": "a3d054078819ea8b5609a014e94878bf1b21b2908c340237ed029e80e58f2349",4343 "src/islands/use-tasks.ts": "1df5748b14427755352b8438977ce8720abc42f1e2f69bf1e927ceaa52166246",4444 "src/pages/index.astro": "6bcbcbd1c1aad8d55855e5f52473b7a7711c439d4877ef54fe7f6f5d4f88ec3c",