aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/messages.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-17 07:03:28 -0700
committerAdam Soltys <[email protected]>2026-08-17 07:03:28 -0700
commit49ae68290099bc37bbbf6d7ad4dee9f906623a38 (patch)
tree01a84328f75caeaa5cd1801e4f49bb7839d1d0f9 /src/features/messages.js
parentede4516e2255bb65d22dd1a74d0e8332b0417194 (diff)
downloadcoinosv3-49ae68290099bc37bbbf6d7ad4dee9f906623a38.tar.gz
coinosv3-49ae68290099bc37bbbf6d7ad4dee9f906623a38.zip
The profile grows a second, honest exit: Log out leaves the room, Log out & forget this device burns it down — behind the Delete-all warning, which now also sweeps the cached balances and history it always implied
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src/features/messages.js')
-rw-r--r--src/features/messages.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index db4ad93..f7fc30a 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -1487,6 +1487,13 @@ export function messagesFeature(ctx) {
},
h('span', { style: 'display:flex', html: '<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>' }),
t('logout'));
+ // Two clearly-named exits: leave (wallets stay saved, one unlock away),
+ // or leave and take everything with you — the latter behind the
+ // Delete-all warning, never a single tap.
+ const forgetBtn = () => ctx.logoutForget ? h('button', {
+ class: 'btn-ghost btn-block small', style: 'color:var(--muted)',
+ onClick: () => ctx.logoutForget(),
+ }, t('logoutForget')) : null;
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
@@ -1569,9 +1576,10 @@ export function messagesFeature(ctx) {
h('button', { class: 'btn-primary btn-block', disabled: ui.profSaving, onClick: saveProfile },
ui.profSaving ? h('span', { class: 'spinner sm' }) : t('save')),
hook('hatShopEntry'),
- logoutBtn())
+ logoutBtn(),
+ forgetBtn())
: mine
- ? logoutBtn() // the editor renders above once the kind 0 loads
+ ? h('div', { class: 'col', style: 'gap:8px' }, logoutBtn(), forgetBtn()) // the editor renders above once the kind 0 loads
: h('div', { class: 'row gap6 wrap' },
h('button', { class: 'btn-primary grow', onClick: () => {
const peer = pk;