From f6f107e02c7a4aa7326c9a82310a239327d81ed6 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sun, 11 Oct 2026 23:43:34 +0200 Subject: feat(hub): tell the person at sign-up what the hub keeps and why A line under the Register button: creating an account accepts the hub's terms of use, and the law requires the hub to keep the connection log (IP address, date, action) for one year, even after the account is deleted. It links to the legal pages of the hub in use, so a self-hosted hub shows its own operator's documents. A notice, not a checkbox: the account rests on the contract and the log on a legal obligation, so there is no consent to ask for, and one that blocks sign-up would be neither free nor withdrawable. legalUrl() moves to platform.js, shared by the sidebar and the form. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/src/meshbay_hub/static/platform.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/platform.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/platform.js b/packages/meshbay-hub/src/meshbay_hub/static/platform.js index 47e3a72..95c3f3a 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/platform.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/platform.js @@ -50,6 +50,21 @@ export function hubOrigin() { return (base ? new URL(base).origin : window.location.origin); } +/** + * The legal pages of the hub in use — its terms of use and privacy statement, + * which are its operator's to write. A browser's own hub, or the configured one + * in the app, like `hubBase()`: a link to meshbay.org's would show somebody + * signing up elsewhere the commitments of an operator who is not theirs. + * + * Opened in a new tab wherever it is linked: 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 — or a half-filled sign-up + * form — on screen. + */ +export function legalUrl() { + return `${hubBase().replace(/\/$/, '')}/legal/`; +} + /** Native-only capabilities. A browser renders none of what these gate. */ export const capabilities = { // Install, configure and drive a node running on this machine. @@ -759,7 +774,7 @@ export async function nativeKeys() { return Boolean(keys && await keys.available()); } -export default { isNative, hubBase, capabilities, secrets, nativeSave, +export default { isNative, hubBase, legalUrl, capabilities, secrets, nativeSave, apiFetch, device, bridgeMessage, folder, rootPicker, node, cast, minimizeToTray, setTrayLabels, setUiLocale, keys, nativeKeys }; -- cgit v1.2.3