Update AppImage

This commit is contained in:
MacRimi
2025-11-04 19:13:47 +01:00
parent 270a73a470
commit f6d26042da
3 changed files with 44 additions and 11 deletions

View File

@@ -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() {
</Button>
<ThemeToggle />
{authRequired && isAuthenticated && (
<Button
variant="outline"
size="sm"
onClick={handleLogout}
className="border-border/50 bg-transparent hover:bg-secondary"
>
Logout
</Button>
)}
</div>
{/* Mobile Actions */}
@@ -457,6 +473,12 @@ export function ProxmoxDashboard() {
</Button>
<ThemeToggle />
{authRequired && isAuthenticated && (
<Button variant="ghost" size="sm" onClick={handleLogout} className="h-8 px-2 text-xs">
Logout
</Button>
)}
</div>
</div>

View File

@@ -184,6 +184,11 @@ export function Settings() {
}
}
const handleLogout = () => {
localStorage.removeItem("proxmenux-auth-token")
window.location.reload()
}
return (
<div className="space-y-6">
<div>
@@ -316,6 +321,10 @@ export function Settings() {
{authEnabled && (
<div className="space-y-3">
<Button onClick={handleLogout} variant="outline" className="w-full bg-transparent">
Logout
</Button>
{!showChangePassword && (
<Button onClick={() => setShowChangePassword(true)} variant="outline" className="w-full">
<Lock className="h-4 w-4 mr-2" />