From 798d78cb137e0ccbe9656fb4882363e640ef8208 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sat, 13 Dec 2025 14:56:48 -0500 Subject: [PATCH] Onboarding: better OS auto-open, move QR to its own row --- pikit-web/onboarding/index.html | 24 ++++++++++++++++-------- pikit-web/onboarding/style.css | 6 ++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/pikit-web/onboarding/index.html b/pikit-web/onboarding/index.html index 7d8edcd..fdfdf3e 100644 --- a/pikit-web/onboarding/index.html +++ b/pikit-web/onboarding/index.html @@ -80,17 +80,22 @@
+
+
+ +

Use your phone

Scan to open https://pikit.local

- QR code to https://pikit.local + QR code to https://pikit.local
+

Once trusted, this page will auto-forward you to the secure dashboard.

If the hostname ever fails, try http://<pi-ip>/ (or https://<pi-ip>/ — your browser will show the same warning to bypass).

@@ -150,7 +155,8 @@ }); // Auto-open matching OS section - const ua = navigator.userAgent.toLowerCase(); + const ua = (navigator.userAgent || "").toLowerCase(); + const platform = (navigator.platform || "").toLowerCase(); const openOne = (id) => { const el = document.getElementById(id)?.parentElement; if (el && el.tagName === "DETAILS") { @@ -160,12 +166,14 @@ }); } }; - if (ua.includes("windows")) openOne("win"); - else if (ua.includes("mac")) openOne("mac"); - else if (ua.includes("arch") || ua.includes("manjaro")) openOne("arch"); - else if (ua.includes("fedora")) openOne("fedora"); - else if (ua.includes("ubuntu") || ua.includes("debian")) openOne("deb"); - else if (ua.includes("bsd")) openOne("bsd"); + const has = (s) => ua.includes(s) || platform.includes(s); + if (has("windows")) openOne("win"); + else if (has("mac")) openOne("mac"); + else if (has("arch") || has("manjaro") || has("garuda")) openOne("arch"); + else if (has("fedora") || has("centos") || has("rhel")) openOne("fedora"); + else if (has("ubuntu") || has("debian") || has("mint")) openOne("deb"); + else if (has("bsd")) openOne("bsd"); + else if (has("linux")) openOne("deb"); if (hasCookie) { statusChip.textContent = "HTTPS trusted — redirecting…"; diff --git a/pikit-web/onboarding/style.css b/pikit-web/onboarding/style.css index 87d1d47..565e9ac 100644 --- a/pikit-web/onboarding/style.css +++ b/pikit-web/onboarding/style.css @@ -191,6 +191,12 @@ code.inline { width: min(360px, 100%); } +.qr-wrap { + display: flex; + justify-content: center; + margin: 8px 0 4px; +} + .qr-title { margin: 0; font-weight: 700;