Release 0.14.0-alpha #42

Merged
uz1mani merged 109 commits from staging into main 2026-03-12 12:12:03 +00:00
54 changed files with 5966 additions and 1296 deletions
Showing only changes of commit 3587f93645 - Show all commits

View File

@@ -100,7 +100,6 @@ export default function SiteDashboardPage() {
const [isDatePickerOpen, setIsDatePickerOpen] = useState(false)
const [isExportModalOpen, setIsExportModalOpen] = useState(false)
const lastUpdatedAtRef = useRef<number | null>(null)
const [, setTick] = useState(0)
// Dimension filters state
const searchParams = useSearchParams()
@@ -374,12 +373,6 @@ export default function SiteDashboardPage() {
if (overview) lastUpdatedAtRef.current = Date.now()
}, [overview])
// Tick every 1s so "Live · Xs ago" counts in real time
useEffect(() => {
const timer = setInterval(() => setTick((t) => t + 1), 1000)
return () => clearInterval(timer)
}, [])
// Save settings to localStorage
const saveSettings = (type: string, newDateRange?: { start: string; end: string }) => {
try {

View File

@@ -161,6 +161,14 @@ export default function Chart({
const { resolvedTheme } = useTheme()
const [showComparison, setShowComparison] = useState(false)
// Tick every 1s so "Live · Xs ago" counts in real time (scoped to Chart only)
const [, setTick] = useState(0)
useEffect(() => {
if (lastUpdatedAt == null) return
const timer = setInterval(() => setTick((t) => t + 1), 1000)
return () => clearInterval(timer)
}, [lastUpdatedAt])
// ─── Annotation state ─────────────────────────────────────────────
const [annotationForm, setAnnotationForm] = useState<{
visible: boolean; editingId?: string; date: string; time: string; text: string; category: string