From 6000a7a60f55edd3e79c3d5ac508a08f5c4b8e5a Mon Sep 17 00:00:00 2001 From: MacRimi Date: Fri, 24 Oct 2025 18:39:00 +0200 Subject: [PATCH] Update proxmox-dashboard.tsx --- AppImage/components/proxmox-dashboard.tsx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/AppImage/components/proxmox-dashboard.tsx b/AppImage/components/proxmox-dashboard.tsx index 4ef1b1c..b480f7f 100644 --- a/AppImage/components/proxmox-dashboard.tsx +++ b/AppImage/components/proxmox-dashboard.tsx @@ -129,6 +129,18 @@ export function ProxmoxDashboard() { return () => clearInterval(interval) }, [fetchSystemData]) + useEffect(() => { + if ( + systemStatus.serverName && + systemStatus.serverName !== "Loading..." && + systemStatus.serverName !== "Server Offline" + ) { + document.title = `${systemStatus.serverName} - ProxMenux Monitor` + } else { + document.title = "ProxMenux Monitor" + } + }, [systemStatus.serverName]) + useEffect(() => { let hideTimeout: ReturnType | null = null let lastPosition = window.scrollY @@ -139,12 +151,10 @@ export function ProxmoxDashboard() { if (currentScrollY < 50) { setShowNavigation(true) - } - else if (delta > 2) { + } else if (delta > 2) { if (hideTimeout) clearTimeout(hideTimeout) hideTimeout = setTimeout(() => setShowNavigation(false), 20) - } - else if (delta < -2) { + } else if (delta < -2) { if (hideTimeout) clearTimeout(hideTimeout) setShowNavigation(true) } @@ -328,9 +338,7 @@ export function ProxmoxDashboard() { className={`sticky z-40 bg-background top-[120px] md:top-[76px] transition-all duration-700 ease-[cubic-bezier(0.4,0,0.2,1)] - ${showNavigation - ? "translate-y-0 opacity-100" - : "-translate-y-[120%] opacity-0 pointer-events-none"} + ${showNavigation ? "translate-y-0 opacity-100" : "-translate-y-[120%] opacity-0 pointer-events-none"} `} >