[0.9.1] FORK_IA_UX v4: restore the customizable bottom bar (pins + edit pencil + fixed Peers/Invites), drop the + FAB

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.
This commit is contained in:
s1to 2026-08-06 16:55:40 +02:00
parent 81be3e6c21
commit b31b8cbfbd
2 changed files with 29 additions and 22 deletions

View file

@ -1052,8 +1052,8 @@ button, input[type="submit"], input[type="button"],
Sin JS (checkbox-hack), gateado por OASIS_MOBILE. Sin JS (checkbox-hack), gateado por OASIS_MOBILE.
========================================================================== */ ========================================================================== */
/* el hive salió del header → el contenido empieza justo bajo la topbar fija (libera espacio arriba) */ /* hive de vuelta en el header: holgura bajo la topbar fija (como en la versión que gustaba) */
body { padding-top: 66px; } body { padding-top: 84px; }
/* --- barra inferior FORK (thumb-zone): 5 huecos con FAB central elevado --- */ /* --- barra inferior FORK (thumb-zone): 5 huecos con FAB central elevado --- */
.oasis-bottombar-fork { align-items: flex-end; gap: 2px; } .oasis-bottombar-fork { align-items: flex-end; gap: 2px; }

View file

@ -1172,29 +1172,36 @@ exports.PINNABLE_MODULES = PINNABLE_MODULES;
const renderBottomBar = () => { const renderBottomBar = () => {
if (process.env.OASIS_MOBILE !== '1') return ""; if (process.env.OASIS_MOBILE !== '1') return "";
const inboxN = sharedState.getInboxCount(); 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 }, { class: "bb-item", href },
span({ class: "bb-ico" }, ico), span({ class: "bb-ico" }, ico),
(badge && badge > 0) ? span({ class: "bb-badge" }, String(badge)) : "", (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 // FORK_IA_UX v4: barra PERSONALIZABLE (pins) + lápiz ✎ para editar (/settings/bottombar)
const exploreBtn = label( // + par FIJO Peers/Invites a la derecha. Sin FAB "+". (restaurada de la versión que gustaba)
{ class: "bb-item bb-explore", for: "fork-explore-toggle", "aria-label": "Explore" }, const MAX = 4;
span({ class: "bb-ico" }, "☰"), const pins = (cfg.bottomBarPins || [])
span({ class: "bb-lbl" }, "Explore") .map(key => PINNABLE_MODULES.find(m => m.key === key))
); .filter(m => m && modOn(m.mod))
const fab = a( .slice(0, MAX);
{ class: "bb-fab-btn", href: "/publish", "aria-label": "Write" }, const slots = pins.map(m => bbLink(
span({ class: "bb-fab-glyph" }, "+") 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( return nav(
{ class: "oasis-bottombar oasis-bottombar-fixed oasis-bottombar-fork", "aria-label": i18n.bbQuickActions || "Quick actions" }, { class: "oasis-bottombar", "aria-label": i18n.bbQuickActions || "Quick actions" },
exploreBtn, ...slots,
bbLink("/pm", "✉", "PM"), editSlot,
fab, div({ class: "bb-pair" }, ...pair)
bbLink("/search", "ꔅ", "Search"),
bbLink("/inbox", "☂", "Inbox", inboxN)
); );
}; };
@ -1324,10 +1331,10 @@ const template = (titlePrefix, ...elements) => {
body( body(
div( div(
{ class: uxMode === "ainav" ? "header ainav-only" : "header" }, { 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'); const updateFlagPath = path.join(__dirname, '../server/.update_required');
if (fs.existsSync(updateFlagPath)) { if (fs.existsSync(updateFlagPath)) {