From 4b74ff3fc54f35fbc41d9c0f7d2b4ec89475154a Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Fri, 11 Sep 2026 13:57:34 +0200 Subject: feat(hub): legal information link at the foot of the sidebar A small link to the hub's legal pages, pinned to the bottom of the sidebar once signed in. It opens in a new tab: the desktop application refuses to navigate away from its interface and hands a new window to the system browser, and in a browser it keeps the session on screen. The address comes from hubBase(), so it is the legal pages of the hub in use. The sidebar now sticks under the navigation bar at the window's height; otherwise, on a long file list, the link would sit at the bottom of the page. The music bar, pinned to the bottom of the window as well, publishes its height through useStickyBand as --music-bar-h and the sidebar stops above it. On a phone the slide-out panel does the same. test_sidebar_legal_measured.py measures the real stylesheet: the link at the bottom of the window on a 3000px page, and above the music bar, at phone and desktop widths. Checked signed in on a local hub in Chrome and Firefox 155. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01D9MCBBWSm9GhBESmqzJxNy --- packages/meshbay-hub/src/meshbay_hub/static/app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/app.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js index dfd0aeb..ba24822 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js @@ -474,10 +474,20 @@ function Sidebar({ groups, presence, indexProgressPct, route, menuOpen, role, ha }) } + + ${t('sidebar.legal')} `; } +// The legal pages of the hub in use: the page's own origin in a browser, the +// configured hub in the application. A new tab either way: the application +// refuses to navigate away from its interface and hands a new window to the +// system browser instead, and in a browser it keeps the session on screen. +function legalUrl() { + return `${platform.hubBase().replace(/\/$/, '')}/legal/`; +} + // ── Home Page ──────────────────────────────────────────────────────────────── function NotificationFeed({ notifications, onMarkRead, onPurge }) { -- cgit v1.2.3