mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 19:46:18 +00:00
Update AppImage
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user