From 018e80e59d001cf3e78ecfa1a6184b0d979caa34 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Tue, 4 Nov 2025 18:45:54 +0100 Subject: [PATCH] Update AppImage --- AppImage/components/onboarding-carousel.tsx | 46 ++++++++++++++------- AppImage/components/proxmox-dashboard.tsx | 16 +++---- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/AppImage/components/onboarding-carousel.tsx b/AppImage/components/onboarding-carousel.tsx index 866fecb..87e4923 100644 --- a/AppImage/components/onboarding-carousel.tsx +++ b/AppImage/components/onboarding-carousel.tsx @@ -176,6 +176,13 @@ export function OnboardingCarousel() { setOpen(false) } + const handleClose = () => { + if (dontShowAgain) { + localStorage.setItem("proxmenux-onboarding-seen", "true") + } + setOpen(false) + } + const handleDotClick = (index: number) => { setDirection(index > currentSlide ? "next" : "prev") setCurrentSlide(index) @@ -184,7 +191,7 @@ export function OnboardingCarousel() { const slide = slides[currentSlide] return ( - +
{/* Close button */} @@ -192,7 +199,7 @@ export function OnboardingCarousel() { variant="ghost" size="icon" className="absolute top-4 right-4 z-50 h-8 w-8 rounded-full bg-background/80 backdrop-blur-sm hover:bg-background" - onClick={handleSkip} + onClick={handleClose} > @@ -234,23 +241,23 @@ export function OnboardingCarousel() {
-
+
-

{slide.title}

-

+

{slide.title}

+

{slide.description}

{slide.features && ( -
+
{slide.features.map((feature, index) => (
-
{feature.icon}
-

{feature.text}

+
{feature.icon}
+

{feature.text}

))}
@@ -272,12 +279,12 @@ export function OnboardingCarousel() { ))}
-
+
- @@ -297,7 +311,7 @@ export function OnboardingCarousel() { ) : (
-
+
diff --git a/AppImage/components/proxmox-dashboard.tsx b/AppImage/components/proxmox-dashboard.tsx index c81974a..2bfe79b 100644 --- a/AppImage/components/proxmox-dashboard.tsx +++ b/AppImage/components/proxmox-dashboard.tsx @@ -70,7 +70,7 @@ export function ProxmoxDashboard() { const [authChecked, setAuthChecked] = useState(false) const [authRequired, setAuthRequired] = useState(false) const [isAuthenticated, setIsAuthenticated] = useState(false) - const [authSetupComplete, setAuthSetupComplete] = useState(false) + const [authDeclined, setAuthDeclined] = useState(false) const fetchSystemData = useCallback(async () => { console.log("[v0] Fetching system data from Flask server...") @@ -278,7 +278,7 @@ export function ProxmoxDashboard() { } const handleAuthSetupComplete = () => { - setAuthSetupComplete(true) + setAuthDeclined(true) setIsAuthenticated(true) } @@ -292,6 +292,8 @@ export function ProxmoxDashboard() { console.log("[v0] Checking authentication status...") try { const token = localStorage.getItem("proxmenux-auth-token") + const hasDeclined = localStorage.getItem("proxmenux-auth-declined") === "true" + const headers: HeadersInit = { "Content-Type": "application/json" } if (token) { @@ -311,17 +313,15 @@ export function ProxmoxDashboard() { const data = await response.json() console.log("[v0] Auth status response:", data) - const authConfigured = data.auth_enabled || data.authenticated - setAuthRequired(data.auth_enabled) setIsAuthenticated(data.authenticated) - setAuthSetupComplete(authConfigured) + setAuthDeclined(hasDeclined || !data.auth_enabled) setAuthChecked(true) console.log("[v0] Auth state:", { authRequired: data.auth_enabled, isAuthenticated: data.authenticated, - authSetupComplete: authConfigured, + authDeclined: hasDeclined || !data.auth_enabled, }) if (data.authenticated && token) { @@ -329,7 +329,7 @@ export function ProxmoxDashboard() { } } catch (error) { console.error("[v0] Failed to check auth status:", error) - setAuthSetupComplete(false) + setAuthDeclined(false) setAuthChecked(true) } } @@ -356,7 +356,7 @@ export function ProxmoxDashboard() {
- {!authSetupComplete && } + {!authDeclined && !authRequired && } {!isServerConnected && (