From b31b8cbfbd6dcb8c454ebc0dd4639159b1423968 Mon Sep 17 00:00:00 2001 From: s1to Date: Thu, 6 Aug 2026 16:55:40 +0200 Subject: [PATCH] [0.9.1] FORK_IA_UX v4: restore the customizable bottom bar (pins + edit pencil + fixed Peers/Invites), drop the + FAB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per feedback: bring the bottom bar back to the design that was liked several versions ago — user-pinned modules, an edit pencil to /settings/bottombar, and a fixed Peers/Invites pair on the right. The central + FAB is removed. The hive returns to the header (top) so Personal/Community filter the visible hexagons; the Explore bottom-sheet is retired. Karvan module kept. --- src/client/assets/themes/OasisMobile.css | 4 +- src/views/main_views.js | 47 ++++++++++++++---------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/client/assets/themes/OasisMobile.css b/src/client/assets/themes/OasisMobile.css index 548f1d1..1238d43 100644 --- a/src/client/assets/themes/OasisMobile.css +++ b/src/client/assets/themes/OasisMobile.css @@ -1052,8 +1052,8 @@ button, input[type="submit"], input[type="button"], Sin JS (checkbox-hack), gateado por OASIS_MOBILE. ========================================================================== */ -/* el hive salió del header → el contenido empieza justo bajo la topbar fija (libera espacio arriba) */ -body { padding-top: 66px; } +/* hive de vuelta en el header: holgura bajo la topbar fija (como en la versión que gustaba) */ +body { padding-top: 84px; } /* --- barra inferior FORK (thumb-zone): 5 huecos con FAB central elevado --- */ .oasis-bottombar-fork { align-items: flex-end; gap: 2px; } diff --git a/src/views/main_views.js b/src/views/main_views.js index ac6d463..8aa6349 100644 --- a/src/views/main_views.js +++ b/src/views/main_views.js @@ -1172,29 +1172,36 @@ exports.PINNABLE_MODULES = PINNABLE_MODULES; const renderBottomBar = () => { if (process.env.OASIS_MOBILE !== '1') return ""; const inboxN = sharedState.getInboxCount(); - const bbLink = (href, ico, lbl, badge) => a( + const cfg = getConfig(); + const modOn = (m) => !m || cfg.modules[m] === 'on' || cfg.modules[m] === undefined; + const bbLink = (href, ico, label, badge) => a( { class: "bb-item", href }, span({ class: "bb-ico" }, ico), (badge && badge > 0) ? span({ class: "bb-badge" }, String(badge)) : "", - span({ class: "bb-lbl" }, lbl) + span({ class: "bb-lbl" }, label) ); - // FORK_IA_UX (thumb-zone): Explorar (abre el hive en hoja inferior) · PM · (+) publicar FAB · Search · Inbox - const exploreBtn = label( - { class: "bb-item bb-explore", for: "fork-explore-toggle", "aria-label": "Explore" }, - span({ class: "bb-ico" }, "☰"), - span({ class: "bb-lbl" }, "Explore") - ); - const fab = a( - { class: "bb-fab-btn", href: "/publish", "aria-label": "Write" }, - span({ class: "bb-fab-glyph" }, "+") + // FORK_IA_UX v4: barra PERSONALIZABLE (pins) + lápiz ✎ para editar (/settings/bottombar) + // + par FIJO Peers/Invites a la derecha. Sin FAB "+". (restaurada de la versión que gustaba) + const MAX = 4; + const pins = (cfg.bottomBarPins || []) + .map(key => PINNABLE_MODULES.find(m => m.key === key)) + .filter(m => m && modOn(m.mod)) + .slice(0, MAX); + const slots = pins.map(m => bbLink( + m.href, m.glyph, i18n[m.labelKey] || m.key, m.key === 'inbox' ? inboxN : 0 + )); + const editSlot = a( + { class: "bb-item bb-add", href: "/settings/bottombar" }, + span({ class: "bb-ico" }, "✎"), + span({ class: "bb-lbl" }, i18n.bbManage || "Edit") ); + const pair = [ bbLink("/peers", "⧖", i18n.peers || "Peers") ]; + if (modOn('invitesMod')) pair.push(bbLink("/invites", "ꔮ", i18n.invites || "Invites")); return nav( - { class: "oasis-bottombar oasis-bottombar-fixed oasis-bottombar-fork", "aria-label": i18n.bbQuickActions || "Quick actions" }, - exploreBtn, - bbLink("/pm", "✉", "PM"), - fab, - bbLink("/search", "ꔅ", "Search"), - bbLink("/inbox", "☂", "Inbox", inboxN) + { class: "oasis-bottombar", "aria-label": i18n.bbQuickActions || "Quick actions" }, + ...slots, + editSlot, + div({ class: "bb-pair" }, ...pair) ); }; @@ -1324,10 +1331,10 @@ const template = (titlePrefix, ...elements) => { body( div( { class: uxMode === "ainav" ? "header ainav-only" : "header" }, - renderMobileTopbar() + renderMobileTopbar(), + // hive de vuelta en el header (bajo el topbar); Personal/Community filtran estos hexágonos + renderHiveNav() ), - // FORK_IA_UX: el hive se abre desde la barra inferior como HOJA alcanzable (thumb-zone), liberando el top para el contenido - renderHiveSheet(), (() => { const updateFlagPath = path.join(__dirname, '../server/.update_required'); if (fs.existsSync(updateFlagPath)) {