From 92e2c48f48afc46e01b2408aa3e7188946a5e9c7 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Tue, 14 Jul 2026 12:07:11 +0000 Subject: [PATCH] =?UTF-8?q?Sync=20shared=20components=20=E2=80=94=20sideba?= =?UTF-8?q?r=20scrollbar,=20Layout,=20AuthGate=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/components/AuthGate.tsx | 10 ++++++---- frontend/src/index.css | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/AuthGate.tsx b/frontend/src/components/AuthGate.tsx index d9569387..632fd3cf 100644 --- a/frontend/src/components/AuthGate.tsx +++ b/frontend/src/components/AuthGate.tsx @@ -1,10 +1,12 @@ import { useEffect, useState, createContext, useContext } from 'react' import type { User } from '../types' -const SHARED_TIMEOUT_MS = 10 * 60 * 1000 - -function isSharedDevice() { - return document.cookie.split(';').some(c => c.trim() === 'hnf_shared_device=1') +function getInactivityMs(): number | null { + if (window.matchMedia('(display-mode: standalone)').matches) return null + const c = document.cookie.split(';').map(s => s.trim()).find(s => s.startsWith('hnf_inactivity_mins=')) + if (!c) return null + const mins = parseInt(c.split('=')[1]) + return isNaN(mins) || mins <= 0 ? null : mins * 60 * 1000 } diff --git a/frontend/src/index.css b/frontend/src/index.css index a7824e2b..d33b9c67 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -395,3 +395,18 @@ html, body, #root { .report-view { padding: 16px; } .report-controls { gap: 8px; } } + +/* Sidebar scrollbar */ +.nav-scroll::-webkit-scrollbar, +.sidebar::-webkit-scrollbar, +.sidebar-nav::-webkit-scrollbar { width: 4px; } +.nav-scroll::-webkit-scrollbar-track, +.sidebar::-webkit-scrollbar-track, +.sidebar-nav::-webkit-scrollbar-track { background: transparent; } +.nav-scroll::-webkit-scrollbar-thumb, +.sidebar::-webkit-scrollbar-thumb, +.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.35); border-radius: 2px; } +.nav-scroll::-webkit-scrollbar-thumb:hover, +.sidebar::-webkit-scrollbar-thumb:hover, +.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.65); } +.nav-scroll, .sidebar, .sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(201,168,76,0.35) transparent; }