diff options
| author | Adam Soltys <[email protected]> | 2026-08-02 19:57:22 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-02 19:57:22 -0700 |
| commit | 5075e9f4c585138cddfe7e7962170dbd2e73874a (patch) | |
| tree | 7006cd4a92d705fd2225525bd526d8917ab28f68 /src/features | |
| parent | 11d55920d48d659212c6fb3a4f6aba79dc3dfd70 (diff) | |
| download | coinosv3-5075e9f4c585138cddfe7e7962170dbd2e73874a.tar.gz coinosv3-5075e9f4c585138cddfe7e7962170dbd2e73874a.zip | |
Header: wallet + avatar only; the avatar opens an identity menu
The chat button leaves the header — the avatar's popup menu carries
Edit profile, Settings, Messages, and Logout (lock()). The menu is
available inside the chat takeover too, which now keeps the full
header. Messages provides just the avatar node via the headerAvatar
seam; the app owns the menu.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/messages.js | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index d74c338..70142e0 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -42,7 +42,6 @@ const COMMUNITY = { }; const EPOCH = 0; -const CHAT_ICON = '<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:block"><path d="M21 11.5a8.38 8.38 0 0 1-8.5 8.5 8.5 8.5 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 8.5-8.5 8.38 8.38 0 0 1 8.5 8.5z"/></svg>'; const DM_RELAYS = ['wss://relay.coinos.io', 'wss://nos.lol']; const APP_BASE = 'https://v3.coinos.io'; const CACHE_MAX = 50; // messages kept per channel / per DM thread in feature state @@ -1250,27 +1249,14 @@ export function messagesFeature(ctx) { id: 'messages', // Chat lives behind a header button and takes over the whole screen — // no balance card, no tabs; each view carries its own way back. - headerButtons() { - return [h('button', { - class: 'btn-sm', title: t('tabMessages'), - onClick: () => { ui.chatOpen = true; render(); }, - }, h('span', { html: CHAT_ICON }))]; - }, - // Rightmost in the header, after the wallet selector. - headerAvatar() { - const me = myPubkeys()[0]; - if (!me) return null; - return h('button', { - class: 'header-avatar', title: t('profEdit'), - onClick: () => openProfile(me), - }, avatar(me, 'chat-avatar header-ava', false)); - }, + // The bare avatar node for the app header's identity menu. + headerAvatar(pk) { return avatar(pk, 'chat-avatar header-ava', false); }, screenView() { if (ui.screen !== 'wallet') return null; if (ui.profilePk) return profileScreen(); if (!ui.chatOpen) return null; return h('div', { class: 'col', style: 'gap:16px' }, - ctx.brandHeader(false), + ctx.brandHeader(true), messagesTab()); }, // Anyone (ark's history, other features) can open a profile or render a |
