Update notification service

This commit is contained in:
MacRimi
2026-03-28 22:19:33 +01:00
parent 71098abb65
commit e55154bd5e
3 changed files with 20 additions and 2 deletions

View File

@@ -228,6 +228,24 @@ export function ProxmoxDashboard() {
window.removeEventListener("changeTab", handleChangeTab as EventListener)
}
}, [])
// Auto-refresh terminal on mobile devices
// This fixes the issue where terminal doesn't connect properly on mobile/VPN
useEffect(() => {
if (activeTab === "terminal") {
const isMobileDevice = window.innerWidth < 768 ||
('ontouchstart' in window && navigator.maxTouchPoints > 0)
if (isMobileDevice) {
// Delay to allow initial connection attempt, then refresh to ensure proper connection
const timeoutId = setTimeout(() => {
setComponentKey(prev => prev + 1)
}, 1500)
return () => clearTimeout(timeoutId)
}
}
}, [activeTab])
useEffect(() => {
const handleHealthStatusUpdate = (event: CustomEvent) => {

View File

@@ -658,7 +658,7 @@ TEMPLATES = {
'default_enabled': True,
},
# ── Network events ─-
# ── Network events ─
'network_down': {
'title': '{hostname}: Network connectivity lost',
'body': 'The node has lost network connectivity.\nReason: {reason}',

View File

@@ -54,7 +54,7 @@ STARTUP_GRACE_CATEGORIES: Set[str] = {
}
# ─── Singleton State ────────────────────────────────────────────────────────
# ─── Singleton State ────────────────────────────────────────────────────────
class _StartupGraceState:
"""