Add username/password login with keyring-backed credential storage
- Dual-mode auth dialog: username/password (default) + API token fallback - Proxmox ticket-based auth via POST /access/ticket - OS keyring integration for secure credential persistence - Auto-open login dialog on launch when unauthenticated - Auth state tracking with auto-refresh support
This commit is contained in:
+9
-8
@@ -44,6 +44,13 @@ function AppContent() {
|
||||
const commandPaletteOpen = useUIStore((s) => s.commandPaletteOpen)
|
||||
const setCommandPaletteOpen = useUIStore((s) => s.setCommandPaletteOpen)
|
||||
|
||||
// Auto-open login dialog when no active connection
|
||||
useEffect(() => {
|
||||
if (!activeConnectionId && !connectionDialogOpen) {
|
||||
setConnectionDialogOpen(true)
|
||||
}
|
||||
}, [activeConnectionId, connectionDialogOpen])
|
||||
|
||||
// WebSocket integration – connects when a connection is active
|
||||
useWebSocket(activeConnectionId)
|
||||
|
||||
@@ -72,16 +79,10 @@ function AppContent() {
|
||||
return (
|
||||
<div className="flex h-full items-center justify-center">
|
||||
<div className="text-center space-y-4">
|
||||
<h2 className="text-2xl font-semibold">Welcome to ProxmoxDesktop</h2>
|
||||
<h2 className="text-2xl font-semibold">ProxmoxDesktop</h2>
|
||||
<p className="text-muted-foreground">
|
||||
Add a Proxmox server to get started
|
||||
Connect to a Proxmox server to get started
|
||||
</p>
|
||||
<button
|
||||
onClick={() => setConnectionDialogOpen(true)}
|
||||
className="px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90"
|
||||
>
|
||||
Add Connection
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user