diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/app.js | 3 | ||||
| -rw-r--r-- | src/features/messages.js | 4 | ||||
| -rw-r--r-- | src/i18n.js | 1 |
3 files changed, 8 insertions, 0 deletions
@@ -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', |
