Update proxmox-dashboard.tsx

This commit is contained in:
MacRimi
2025-10-23 19:57:11 +02:00
parent 03a007b9b6
commit 6e86275dce

View File

@@ -133,13 +133,12 @@ export function ProxmoxDashboard() {
const handleScroll = () => {
const currentScrollY = window.scrollY
// Only hide navigation if scrolled down more than 100px
if (currentScrollY < 100) {
setShowNavigation(true)
} else if (currentScrollY > lastScrollY) {
} else if (currentScrollY > lastScrollY + 20) {
// Scrolling down - hide navigation
setShowNavigation(false)
} else if (currentScrollY < lastScrollY) {
} else if (currentScrollY < lastScrollY - 20) {
// Scrolling up - show navigation
setShowNavigation(true)
}
@@ -317,7 +316,7 @@ export function ProxmoxDashboard() {
</header>
<div
className={`sticky top-[88px] z-40 bg-background transition-transform duration-300 ease-in-out ${
className={`sticky top-[160px] md:top-[88px] z-40 bg-background transition-transform duration-300 ease-in-out ${
showNavigation ? "translate-y-0" : "-translate-y-[120%]"
}`}
>