From f96bdee71dfede818960831c2db0b544f22737d3 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Thu, 23 Oct 2025 21:28:00 +0200 Subject: [PATCH] Update proxmox-dashboard.tsx --- AppImage/components/proxmox-dashboard.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AppImage/components/proxmox-dashboard.tsx b/AppImage/components/proxmox-dashboard.tsx index f00bccc..3aef33f 100644 --- a/AppImage/components/proxmox-dashboard.tsx +++ b/AppImage/components/proxmox-dashboard.tsx @@ -129,8 +129,9 @@ export function ProxmoxDashboard() { return () => clearInterval(interval) }, [fetchSystemData]) + useEffect(() => { - let hideTimeout: NodeJS.Timeout | null = null + let hideTimeout: ReturnType | null = null const handleScroll = () => { const currentScrollY = window.scrollY @@ -138,15 +139,12 @@ export function ProxmoxDashboard() { const scrollingUp = currentScrollY < lastScrollY if (currentScrollY < 150) { - // Top of page → always show if (hideTimeout) clearTimeout(hideTimeout) setShowNavigation(true) } else if (scrollingDown) { - // Scrolling down → hide smoothly after small delay if (hideTimeout) clearTimeout(hideTimeout) hideTimeout = setTimeout(() => setShowNavigation(false), 100) } else if (scrollingUp) { - // Scrolling up → show immediately if (hideTimeout) clearTimeout(hideTimeout) setShowNavigation(true) }