diff options
| author | Adam Soltys <[email protected]> | 2026-11-10 11:44:52 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-11-10 11:44:52 -0700 |
| commit | 0fa2ea40ce21b642552d2d64e31bd80461cfa7ef (patch) | |
| tree | 67942c9bbc058f222807a770eb13c3ced2169109 /src/public-chat.js | |
| parent | 520aa7a1e39dbe9d8e0fd44b5cc3ce06e79f5abf (diff) | |
| download | coinosv3-0fa2ea40ce21b642552d2d64e31bd80461cfa7ef.tar.gz coinosv3-0fa2ea40ce21b642552d2d64e31bd80461cfa7ef.zip | |
The public chat page's button opens the chat for someone who has a wallet here, and stops telling them to sign in. "andy's having some trouble with the public chat … I can see the feed etc fine, so I am logged in" (Adam relaying Andy, 2026-11-10): /chat read "sign in to join the conversation" to a signed-in reader, and its "Open coinos" button went to the wallet, leaving him to find the chat. With an account on the device the line now reads "open the chat in Coinos to join the conversation" and the button "Join the chat", which goes to /?chat: the app takes the marker off the address and, once the wallet is open, opens the coinos community's room. A saved wallet counts as an account too (a tab opened from a link has no session yet). And /chat, /pos and /feed no longer paint the static profile shell (a card named "chat") while they load. tools/public-chat-join-test.js
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'src/public-chat.js')
| -rw-r--r-- | src/public-chat.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/public-chat.js b/src/public-chat.js index 9cce6f5..dd54342 100644 --- a/src/public-chat.js +++ b/src/public-chat.js @@ -213,7 +213,9 @@ export function mountPublicChat() { const hasAccount = (() => { try { - return !!(sessionStorage.getItem('btc-wallet-accounts') || (JSON.parse(localStorage.getItem('btc-wallet-watch') || '[]')).length); + // a session in this tab, a saved wallet (a tab opened from a link has no session yet), or a watch-only one + return !!(sessionStorage.getItem('btc-wallet-accounts') || localStorage.getItem('btc-wallet-vault') + || (JSON.parse(localStorage.getItem('btc-wallet-watch') || '[]')).length); } catch { return false; } })(); @@ -306,8 +308,9 @@ export function mountPublicChat() { h('div', { class: 'row between', style: 'align-items:center;gap:10px' }, h('div', { class: 'col', style: 'gap:2px;min-width:0' }, h('div', { class: 'chat-title' }, t('publicChatTitle', { name: COMMUNITY.name })), - h('div', { class: 'small muted' }, t('publicChatDesc'))), - h('button', { class: 'btn-primary btn-sm', style: 'flex-shrink:0', onClick: () => { location.href = '/'; } }, + h('div', { class: 'small muted' }, t(hasAccount ? 'publicChatDescMember' : 'publicChatDesc'))), + // with an account on the device the button opens the room itself (/?chat) + h('button', { class: 'btn-primary btn-sm', style: 'flex-shrink:0', onClick: () => { location.href = hasAccount ? '/?chat' : '/'; } }, hasAccount ? t('publicChatOpenApp') : t('publicChatSignIn'))), tabs), log)); |
