Sync shared components — sidebar scrollbar, Layout, AuthGate updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-14 12:07:11 +00:00
parent da6d50ff95
commit 92e2c48f48
2 changed files with 21 additions and 4 deletions

View file

@ -1,10 +1,12 @@
import { useEffect, useState, createContext, useContext } from 'react' import { useEffect, useState, createContext, useContext } from 'react'
import type { User } from '../types' import type { User } from '../types'
const SHARED_TIMEOUT_MS = 10 * 60 * 1000 function getInactivityMs(): number | null {
if (window.matchMedia('(display-mode: standalone)').matches) return null
function isSharedDevice() { const c = document.cookie.split(';').map(s => s.trim()).find(s => s.startsWith('hnf_inactivity_mins='))
return document.cookie.split(';').some(c => c.trim() === 'hnf_shared_device=1') if (!c) return null
const mins = parseInt(c.split('=')[1])
return isNaN(mins) || mins <= 0 ? null : mins * 60 * 1000
} }

View file

@ -395,3 +395,18 @@ html, body, #root {
.report-view { padding: 16px; } .report-view { padding: 16px; }
.report-controls { gap: 8px; } .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; }