From b6cca5ba5196d3b89df4708c0b1aff31ec624df0 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 9 Oct 2026 16:03:04 -0700 Subject: Move desktop logo and search into sticky sidebars --- src/app.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 3e05c5b..02c1ef1 100644 --- a/src/app.js +++ b/src/app.js @@ -841,6 +841,7 @@ function renderInner() { // public pages — never over sign-in, onboarding or the lock prompt. const navPage = ui.pubProf || (activeAccount() && ['wallet', 'accounts', 'accountSettings'].includes(ui.screen) && !(ui.onb || onbInProgress())); const bottomNav = navPage && !lockAsk && !_bootDeciding ? featureHook('bottomNav') : null; + if (bottomNav) bottomNav.prepend(h('div', { class: 'app-nav-wide app-nav-brand' }, brandLogo())); // the wallet beside the feed and chats on a wide screen (its own page needs no twin) const side = bottomNav && featScreen && WIDE_MQ && WIDE_MQ.matches ? walletSide() : null; morphChildren(root, [screen, footer(), ...(bottomNav ? [bottomNav] : []), ...(side ? [side] : []), ...(ui.lightbox ? [imageViewer()] : [])]); @@ -2680,8 +2681,8 @@ function lockBtn() { } // Find anyone on nostr from the header — results open their profile. -// Wide screens trade the search icon for a field in the header: typing in it -// opens (and drives) the search page, which then drops its own copy of it. +// Wide screens trade the search icon for a field in the header or sticky +// wallet sidebar. It drives the search page, which drops its own copy. function headerSearch() { if (!featureHook('userSearchAvailable')) return null; return h('input', { @@ -2713,18 +2714,22 @@ function searchBtn() { })); } -function brandHeader(withLock) { - const acc = activeAccount(); +function brandLogo() { return h( - 'div', - { class: 'row between' }, - h( 'div', { class: 'brand' + (STAGING ? ' staging' : ' beta'), style: 'cursor:pointer', title: t('home'), onClick: goHome }, STAGING ? h('span', { class: 'staging-badge', title: 'staging build: new wallets start on Mutinynet' }, 'staging') : h('span', { class: 'beta-badge' }, 'v3 beta'), h('div', { class: 'logo-full', 'aria-label': 'coinos', role: 'img', html: '' }) - ), + ); +} + +function brandHeader(withLock) { + const acc = activeAccount(); + return h( + 'div', + { class: 'row between brand-header' }, + brandLogo(), withLock ? h('div', { class: 'row gap6', style: 'align-items:center' }, searchBtn(), @@ -4411,6 +4416,7 @@ function walletSide() { const line = (label, sat) => h('div', { class: 'row between small' }, h('span', { class: 'muted' }, label), h('span', {}, fmtAmount(sat) + ' ' + unitLabel())); return h('aside', { class: 'wallet-side col', 'data-key': 'wallet-side' }, + headerSearch(), h('div', { class: 'card col', style: 'gap:10px' }, h('button', { type: 'button', class: 'wallet-side-total', onClick: () => toWallet('history') }, h('span', { class: 'small muted' }, t('balance')), -- cgit v1.2.3