mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-18 10:02:16 +00:00
Update notification service
This commit is contained in:
@@ -228,6 +228,24 @@ export function ProxmoxDashboard() {
|
|||||||
window.removeEventListener("changeTab", handleChangeTab as EventListener)
|
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(() => {
|
useEffect(() => {
|
||||||
const handleHealthStatusUpdate = (event: CustomEvent) => {
|
const handleHealthStatusUpdate = (event: CustomEvent) => {
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ TEMPLATES = {
|
|||||||
'default_enabled': True,
|
'default_enabled': True,
|
||||||
},
|
},
|
||||||
|
|
||||||
# ── Network events ─-
|
# ── Network events ──
|
||||||
'network_down': {
|
'network_down': {
|
||||||
'title': '{hostname}: Network connectivity lost',
|
'title': '{hostname}: Network connectivity lost',
|
||||||
'body': 'The node has lost network connectivity.\nReason: {reason}',
|
'body': 'The node has lost network connectivity.\nReason: {reason}',
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ STARTUP_GRACE_CATEGORIES: Set[str] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# ─── Singleton State ────────────────────────────────────────────────────────
|
# ─── Singleton State ─────────────────────────────────────────────────────────
|
||||||
|
|
||||||
class _StartupGraceState:
|
class _StartupGraceState:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user