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/app.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 67a82df..a7ce84d 100644 --- a/src/app.js +++ b/src/app.js @@ -333,7 +333,7 @@ wallet.subscribe(scheduleRender); // buttons (and Android/system back) move between screens we've actually viewed. // We snapshot only the navigation-relevant `ui` fields, so incidental re-renders // (typing, polling, balance updates) don't create history entries. -const NAV_FIELDS = ['screen', 'tab', 'txDetail', 'bump', 'giftMode', 'claimStep', 'msgView', 'msgCommunity', 'msgPeer', 'settingsPage']; +const NAV_FIELDS = ['screen', 'tab', 'txDetail', 'bump', 'giftMode', 'claimStep', 'chatOpen', 'msgView', 'msgCommunity', 'msgPeer', 'settingsPage']; function navSnapshot() { const s = {}; for (const f of NAV_FIELDS) s[f] = ui[f] ?? null; @@ -1358,9 +1358,12 @@ function brandHeader(withLock) { { class: 'brand', style: 'cursor:pointer', title: t('home'), onClick: goHome }, h('div', { class: 'logo-full', 'aria-label': 'coinos', role: 'img', html: '' }) ), - withLock && - h('button', { class: 'btn-sm', onClick: () => { ui.screen = 'accounts'; render(); } }, - acc ? acc.label : t('accounts')) + withLock + ? h('div', { class: 'row gap6' }, + ...featureAll('headerButtons'), + h('button', { class: 'btn-sm', onClick: () => { ui.screen = 'accounts'; render(); } }, + acc ? acc.label : t('accounts'))) + : null ); } @@ -1592,6 +1595,7 @@ function goHome() { // so the logo is always a way back to your wallet. if (activeAccount()) { ui.screen = 'wallet'; + ui.chatOpen = false; // the logo always leads back to the wallet, chat included ui.tab = wallet.offline ? 'settings' : 'receive'; ui.draft = null; ui.sendResult = null; @@ -1978,7 +1982,6 @@ function tabsBar() { // Watch-only wallets show Send too — it prompts to load the seed to spend. ['send', t('tabSend')], ['history', t('tabHistory')], - ...featureAll('tabs'), // feature-provided tabs (e.g. messages) sit before Settings ['settings', t('tabSettings')], ]; return h( @@ -2008,7 +2011,6 @@ function tabContent() { case 'send': return sendTab(); case 'history': return historyTab(); case 'settings': return settingsTab(); - default: return featureHook('tabContent', ui.tab); } } -- cgit v1.2.3