From 404350a32f26c892fa7b3b65f222ebc955be8a36 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 2 Aug 2026 16:52:41 -0700 Subject: Chat behind a header button, full-screen; move-panel polish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chat leaves the tab bar (which returns to its four evenly spaced tabs) for an icon button in the header next to the wallet selector. It now takes over the whole screen — no balance card, no tabs — with a back button on the chat home view, and the logo still leads back to the wallet. The generic tabs/tabContent seams this reverts to unused are removed again. Move panel: the direction toggle stretches across the card, and the "X sats in Spending" line is gone — the balance sits right above it. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/features/ark.js | 2 +- src/features/messages.js | 27 +++++++++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index d98e92e..4d9242c 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -1372,7 +1372,7 @@ export function arkFeature(ctx) { h('span', { class: 'spinner sm' }), h('span', { class: 'small muted' }, t('arkConnecting')))) : h('div', { class: 'col', style: 'gap:8px' }, h('p', { class: 'small muted', style: 'margin:0' }, t('moveToSavingDesc')), - h('div', { class: 'small faint' }, t('moveAvailable', { n: fmtAmount(b ? b.spendableSat : 0) + ' ' + unitLabel() })), + // no "X sats in Spending" line — the balance sits right above on this card h('button', { class: 'btn-block', disabled: !b || !b.spendableSat, onClick: () => { ui.arkMoveOpen = false; ui.arkExitPage = true; ui.arkError = ''; render(); }, diff --git a/src/features/messages.js b/src/features/messages.js index 2484b46..25e6f7a 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -40,6 +40,7 @@ const COMMUNITY = { }; const EPOCH = 0; +const CHAT_ICON = ''; 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 @@ -104,7 +105,7 @@ export function messagesFeature(ctx) { if (repaintTimer) return; repaintTimer = setTimeout(() => { repaintTimer = null; - if (ui.screen === 'wallet' && ui.tab === 'messages') render(); + if (ui.screen === 'wallet' && ui.chatOpen) render(); }, 80); }; @@ -785,6 +786,11 @@ export function messagesFeature(ctx) { const kids = []; + // Chat takes the whole screen, so home carries the way back to the wallet. + kids.push(h('div', { class: 'row gap6', style: 'align-items:center' }, + backBtn(() => { ui.chatOpen = false; render(); }), + h('h3', { style: 'margin:0' }, t('tabMessages')))); + if (pendingLink) kids.push(linkInviteCard()); for (const [rid, inv] of pendingDirect) kids.push(directInviteCard(rid, inv)); @@ -1052,15 +1058,24 @@ export function messagesFeature(ctx) { return { id: 'messages', - tabs: () => [['messages', t('tabMessages')]], - tabContent(tab) { - if (tab !== 'messages') return null; - return messagesTab(); + // 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 }))]; + }, + screenView() { + if (!ui.chatOpen || ui.screen !== 'wallet') return null; + return h('div', { class: 'col', style: 'gap:16px' }, + ctx.brandHeader(false), + messagesTab()); }, init() { if (urlInvite && !pendingLink) { loadLinkInvite(urlInvite); - setTimeout(() => { ui.tab = 'messages'; ui.msgView = 'home'; render(); }, 0); + setTimeout(() => { ui.chatOpen = true; ui.msgView = 'home'; render(); }, 0); } startDMs(); syncLists().catch(() => {}); -- cgit v1.2.3