diff --git a/AppImage/components/proxmox-dashboard.tsx b/AppImage/components/proxmox-dashboard.tsx index 2bfe79b..88762a9 100644 --- a/AppImage/components/proxmox-dashboard.tsx +++ b/AppImage/components/proxmox-dashboard.tsx @@ -287,6 +287,11 @@ export function ProxmoxDashboard() { setupTokenRefresh() } + const handleLogout = () => { + localStorage.removeItem("proxmenux-auth-token") + setIsAuthenticated(false) + } + useEffect(() => { const checkAuth = async () => { console.log("[v0] Checking authentication status...") @@ -443,6 +448,17 @@ export function ProxmoxDashboard() { + + {authRequired && isAuthenticated && ( + + Logout + + )} {/* Mobile Actions */} @@ -457,6 +473,12 @@ export function ProxmoxDashboard() { + + {authRequired && isAuthenticated && ( + + Logout + + )} diff --git a/AppImage/components/settings.tsx b/AppImage/components/settings.tsx index 04fce52..3c290ff 100644 --- a/AppImage/components/settings.tsx +++ b/AppImage/components/settings.tsx @@ -184,6 +184,11 @@ export function Settings() { } } + const handleLogout = () => { + localStorage.removeItem("proxmenux-auth-token") + window.location.reload() + } + return (