mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 03:26:17 +00:00
Update proxmox-dashboard.tsx
This commit is contained in:
@@ -320,13 +320,19 @@ export function ProxmoxDashboard() {
|
|||||||
|
|
||||||
setAuthRequired(data.auth_enabled)
|
setAuthRequired(data.auth_enabled)
|
||||||
setIsAuthenticated(data.authenticated)
|
setIsAuthenticated(data.authenticated)
|
||||||
setAuthDeclined(hasDeclined || !data.auth_enabled)
|
|
||||||
|
// If auth is not configured and user hasn't declined, show the modal
|
||||||
|
const shouldShowModal = !data.auth_configured && !hasDeclined
|
||||||
|
setAuthDeclined(!shouldShowModal)
|
||||||
setAuthChecked(true)
|
setAuthChecked(true)
|
||||||
|
|
||||||
console.log("[v0] Auth state:", {
|
console.log("[v0] Auth state:", {
|
||||||
authRequired: data.auth_enabled,
|
authRequired: data.auth_enabled,
|
||||||
isAuthenticated: data.authenticated,
|
isAuthenticated: data.authenticated,
|
||||||
authDeclined: hasDeclined || !data.auth_enabled,
|
authConfigured: data.auth_configured,
|
||||||
|
hasDeclined: hasDeclined,
|
||||||
|
shouldShowModal: shouldShowModal,
|
||||||
|
authDeclined: !shouldShowModal,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (data.authenticated && token) {
|
if (data.authenticated && token) {
|
||||||
|
|||||||
Reference in New Issue
Block a user