diff --git a/AppImage/components/proxmox-dashboard.tsx b/AppImage/components/proxmox-dashboard.tsx index 823fd9e9..3a9eff88 100644 --- a/AppImage/components/proxmox-dashboard.tsx +++ b/AppImage/components/proxmox-dashboard.tsx @@ -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) => { diff --git a/AppImage/scripts/notification_templates.py b/AppImage/scripts/notification_templates.py index b1116771..86c2cef2 100644 --- a/AppImage/scripts/notification_templates.py +++ b/AppImage/scripts/notification_templates.py @@ -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}', diff --git a/AppImage/scripts/startup_grace.py b/AppImage/scripts/startup_grace.py index 6e0fb177..33a92df8 100644 --- a/AppImage/scripts/startup_grace.py +++ b/AppImage/scripts/startup_grace.py @@ -54,7 +54,7 @@ STARTUP_GRACE_CATEGORIES: Set[str] = { } -# ─── Singleton State ──────────────────────────────────────────────────────── +# ─── Singleton State ───────────────────────────────────────────────────────── class _StartupGraceState: """