aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-15 15:58:32 -0700
committerAdam Soltys <[email protected]>2026-08-15 15:58:32 -0700
commitc42f379ad3ae25eec94404c8e64ea19c9921f03a (patch)
tree5d90b0c70988409223930b401672d206392d41c2
parentaaecfddb1867c2d6b69096127ac30093657b53e8 (diff)
downloadcoinosv3-c42f379ad3ae25eec94404c8e64ea19c9921f03a.tar.gz
coinosv3-c42f379ad3ae25eec94404c8e64ea19c9921f03a.zip
Your own profile carries the exit: Log out signs the session off entirely, distinct from the padlock's lock-in-place
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv
-rw-r--r--src/app.js3
-rw-r--r--src/features/messages.js4
-rw-r--r--src/i18n.js1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
index c9b690a..af7421d 100644
--- a/src/app.js
+++ b/src/app.js
@@ -4065,6 +4065,9 @@ const ctx = {
// support) — lazy so it resolves against the final FEATURES list, and a
// build without the target feature simply gets null back
hook: (name, ...args) => featureHook(name, ...args),
+ // full sign-out (distinct from the padlock's lock-in-place): clear the
+ // session and leave — offering a password if none protects the vault yet
+ logout: () => { lock({ offerPassword: true }); },
getAccount: () => accountSel(),
setAccount: (a, dir) => setAccountSel(a, dir),
// Open (or create) a wallet from a mnemonic — used by nostr login.
diff --git a/src/features/messages.js b/src/features/messages.js
index 4c3a8e1..a6cc1e1 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -1454,6 +1454,10 @@ export function messagesFeature(ctx) {
noteRow(pk, ev, name),
])));
})(),
+ mine ? h('button', {
+ class: 'btn-ghost btn-block', style: 'color:var(--red,#c0392b)',
+ onClick: () => { ui.profilePk = null; ui.profEdit = null; ctx.logout && ctx.logout(); },
+ }, t('logout')) : null,
h('button', { class: 'btn-ghost btn-block', onClick: () => { ui.profilePk = null; ui.profEdit = null; render(); } }, t('back')));
}
diff --git a/src/i18n.js b/src/i18n.js
index ae354aa..9e5d77f 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -671,6 +671,7 @@ const STR = {
spendingName: 'Spending',
manageAccounts: 'Wallets',
lockedToast: 'Locked',
+ logout: 'Log out',
lockedTitle: 'Locked',
lockedDesc: 'Your wallets are locked on this device. Enter your password to open them again.',
settingsWalletDesc: 'Name, keys, backup',