diff options
| author | Adam Soltys <[email protected]> | 2026-08-28 12:08:49 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-28 12:08:49 -0700 |
| commit | 02f673c68052aa8751aa08fd33bb71357bcd1526 (patch) | |
| tree | 5c74c10cb52cbbaeccc2b63d25800697dd570831 /src/features | |
| parent | d8f84d2df8fe5f75d42d5aed94534e4334478409 (diff) | |
| download | coinosv3-02f673c68052aa8751aa08fd33bb71357bcd1526.tar.gz coinosv3-02f673c68052aa8751aa08fd33bb71357bcd1526.zip | |
Forget-all keeps its word: the delete-everything warning lives inside the logout popup now, and confirming it wipes on the spot and lands on the front door — no detour through the Accounts page that looked like the deed was done when only a confirm screen had opened
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/messages.js | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index e49a7b9..be1abf5 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -1606,23 +1606,37 @@ export function messagesFeature(ctx) { // One Log out button; the popup offers the two exits — leave (wallets // stay saved, one unlock away) or leave and take everything with you. // The full wipe still routes through the Delete-all warning after this. + // Two stages in one popup: the plain logout choices, then — if "forget + // all data" is picked — the delete-everything warning right here. The old + // flow detoured to the Accounts page for that confirmation, which read + // as broken navigation (and left people thinking data was wiped when + // only a confirm screen had opened). const logoutPop = () => !ui.logoutConfirm ? null : h('div', { class: 'confirm-pop-backdrop', onClick: (e) => { if (e.target === e.currentTarget) { ui.logoutConfirm = null; render(); } }, }, - h('div', { class: 'card col confirm-pop', style: 'gap:10px' }, - h('h3', { style: 'margin:0' }, t('logout') + '?'), - h('p', { class: 'small muted', style: 'margin:0' }, t('logoutPopBlurb')), - h('button', { class: 'btn-primary btn-block', onClick: () => { - ui.logoutConfirm = null; - ui.profilePk = null; ui.profEdit = null; ui.profEditFilled = false; - ctx.logout && ctx.logout(); - } }, t('logout')), - ctx.logoutForget ? h('button', { - class: 'btn-block', style: 'color:var(--red,#c0392b)', - onClick: () => { ui.logoutConfirm = null; ctx.logoutForget(); }, - }, t('logoutForget')) : null, - h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.logoutConfirm = null; render(); } }, t('back')))); + ui.logoutConfirm === 'forget' + ? h('div', { class: 'card col confirm-pop', style: 'gap:10px' }, + h('h3', { style: 'margin:0' }, t('logoutForget') + '?'), + h('div', { class: 'notice err small' }, t('clearAllWarn')), + h('button', { + class: 'btn-block', style: 'color:var(--red,#c0392b)', + onClick: () => { ui.logoutConfirm = null; ctx.logoutForget(); }, + }, t('clearAll')), + h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.logoutConfirm = true; render(); } }, t('back'))) + : h('div', { class: 'card col confirm-pop', style: 'gap:10px' }, + h('h3', { style: 'margin:0' }, t('logout') + '?'), + h('p', { class: 'small muted', style: 'margin:0' }, t('logoutPopBlurb')), + h('button', { class: 'btn-primary btn-block', onClick: () => { + ui.logoutConfirm = null; + ui.profilePk = null; ui.profEdit = null; ui.profEditFilled = false; + ctx.logout && ctx.logout(); + } }, t('logout')), + ctx.logoutForget ? h('button', { + class: 'btn-block', style: 'color:var(--red,#c0392b)', + onClick: () => { ui.logoutConfirm = 'forget'; render(); }, + }, t('logoutForget')) : null, + h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.logoutConfirm = null; render(); } }, t('back')))); const full = fullProfiles.get(pk); // Your own profile IS the editor — and it renders IMMEDIATELY, seeded // from the local name/picture cache, so the page never reflows when the |
