aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/messages.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-03 22:52:54 -0700
committerAdam Soltys <[email protected]>2026-08-03 22:52:54 -0700
commit7b7e93a6086171fec8a710063c86dbe5d4b9841f (patch)
tree9d38117bdd33d4323430b446c3df0df6a42d90ba /src/features/messages.js
parent9510929a197fc38f1de762d99c8fde80c788ca30 (diff)
downloadcoinosv3-7b7e93a6086171fec8a710063c86dbe5d4b9841f.tar.gz
coinosv3-7b7e93a6086171fec8a710063c86dbe5d4b9841f.zip
Give the nostr settings page a way to reconnect
The app could tell you your signer wasn't connected and then send you somewhere with nothing to click: once an account was linked, the nostr card showed only an npub. It now shows connected/not connected, says what's missing, and offers the same signer options as signing in — refusing a different account rather than quietly swapping identities, since this is a reconnect and not a login. Pasted keys go back to not being persisted at all. Storing one would have survived a reload, but the UI promises a pasted key is used once and never kept, and that promise is worth more than saving a paste; those logins reconnect from this card like any other. The chat banner now tracks the live signer alone. The flag that suppressed it after a reconnect would also have hidden a later genuine disconnect. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi
Diffstat (limited to 'src/features/messages.js')
-rw-r--r--src/features/messages.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 7f21d53..e9d1799 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -1232,7 +1232,7 @@ export function messagesFeature(ctx) {
// missing — so this offers to fetch it back rather than to log in again.
function signerNotice() {
const id = hook('nostrLoginIdentity');
- if (!id || id.signer || ui.msgReconnected) return null;
+ if (!id || id.signer) return null;
return h('div', { class: 'row gap6 chat-signer-off', style: 'align-items:center' },
h('span', { class: 'small muted grow' }, t('msgSignerOff')),
h('button', {
@@ -1241,7 +1241,7 @@ export function messagesFeature(ctx) {
ui.msgReconnecting = true; render();
const s = await hook('nostrLoginResume');
ui.msgReconnecting = false;
- if (s) { ui.msgReconnected = true; toast(t('msgSignerBack')); }
+ if (s) toast(t('msgSignerBack'));
else { ui.chatOpen = false; ui.screen = 'wallet'; ui.tab = 'settings'; ui.settingsPage = 'nostr'; }
render();
},