From 815a0d1b4b71e12512cef5a8f59aa9d454d779d7 Mon Sep 17 00:00:00 2001 From: dax Date: Tue, 4 Aug 2026 19:49:03 +0100 Subject: stream import uploads to disk; advertise direct-origin fast uploads; fix /api/paths total --- public/app.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'public/app.js') diff --git a/public/app.js b/public/app.js index 78584bf..780bc98 100644 --- a/public/app.js +++ b/public/app.js @@ -661,6 +661,21 @@ function hideImportState() { stage.classList.remove("blocked") } +async function initDirectHint() { + try { + const r = await fetch("/api/health") + const data = await r.json() + const d = data.direct || {} + const urls = [d.magic, d.lan, d.tailscale].filter(Boolean) + if (!urls.length) return + if (urls.some((u) => { try { return new URL(u).host === location.host } catch { return false } })) return + const link = $("#direct-link") + link.textContent = d.magic + link.href = d.magic + $("#direct-hint").hidden = false + } catch { /* ignore */ } +} + async function beginWalk() { if (started) return started = true @@ -695,6 +710,7 @@ async function beginWalk() { } catch { showImportState() } + initDirectHint() })() let toastTimer = 0 -- cgit v1.3.1