diff --git a/AppImage/components/health-status-modal.tsx b/AppImage/components/health-status-modal.tsx index 7a1f8642..0a0d4a69 100644 --- a/AppImage/components/health-status-modal.tsx +++ b/AppImage/components/health-status-modal.tsx @@ -184,6 +184,10 @@ export function HealthStatusModal({ open, onOpenChange, getApiUrl }: HealthStatu CATEGORIES.forEach(({ key }) => { const cat = healthData.details[key as keyof typeof healthData.details] if (cat && cat.status?.toUpperCase() !== "OK") { + // Updates section: only auto-expand on WARNING+, not INFO + if (key === "updates" && cat.status?.toUpperCase() === "INFO") { + return + } nonOkCategories.add(key) } }) diff --git a/AppImage/components/notification-settings.tsx b/AppImage/components/notification-settings.tsx index 6d720da3..379d68a2 100644 --- a/AppImage/components/notification-settings.tsx +++ b/AppImage/components/notification-settings.tsx @@ -2,7 +2,7 @@ import { useState, useEffect, useCallback } from "react" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "./ui/card" -import { Tabs, TabsList, TabsTrigger, TabsContent } from "./ui/tabs" + import { Input } from "./ui/input" import { Label } from "./ui/label" import { Badge } from "./ui/badge" @@ -143,6 +143,7 @@ export function NotificationSettings() { const [editMode, setEditMode] = useState(false) const [hasChanges, setHasChanges] = useState(false) const [expandedCategories, setExpandedCategories] = useState>(new Set()) + const [selectedChannel, setSelectedChannel] = useState(null) const [originalConfig, setOriginalConfig] = useState(DEFAULT_CONFIG) const [webhookSetup, setWebhookSetup] = useState<{ status: "idle" | "running" | "success" | "failed" @@ -670,41 +671,106 @@ matcher: proxmenux-pbs Channels -
- - - - Telegram - - - Gotify - - - Discord - - - Email - - + {/* ── Channel Cards Grid ── */} +
+ {([ + { key: "telegram", label: "Telegram", color: "blue", activeColor: "bg-blue-600 hover:bg-blue-700", + logo: }, + { key: "gotify", label: "Gotify", color: "green", activeColor: "bg-green-600 hover:bg-green-700", + logo: }, + { key: "discord", label: "Discord", color: "indigo", activeColor: "bg-indigo-600 hover:bg-indigo-700", + logo: }, + { key: "email", label: "Email", color: "amber", activeColor: "bg-amber-600 hover:bg-amber-700", + logo: }, + ] as const).map(ch => { + const isEnabled = config.channels[ch.key]?.enabled || false + const isSelected = selectedChannel === ch.key + const colorMap: Record = { + blue: "border-blue-500/60 bg-blue-500/10", + green: "border-green-500/60 bg-green-500/10", + indigo: "border-indigo-500/60 bg-indigo-500/10", + amber: "border-amber-500/60 bg-amber-500/10", + } + const textColorMap: Record = { + blue: "text-blue-400", + green: "text-green-400", + indigo: "text-indigo-400", + amber: "text-amber-400", + } + const mutedColorMap: Record = { + blue: "text-blue-500/30", + green: "text-green-500/30", + indigo: "text-indigo-500/30", + amber: "text-amber-500/30", + } + const switchColorMap: Record = { + blue: "bg-blue-600", + green: "bg-green-600", + indigo: "bg-indigo-600", + amber: "bg-amber-600", + } - {/* Telegram */} - -
- + return ( -
- {config.channels.telegram?.enabled && ( + ) + })} +
+ + {/* ── Selected Channel Configuration Panel ── */} + {selectedChannel === "telegram" && ( +
+ {config.channels.telegram?.enabled ? ( <>
@@ -733,7 +799,6 @@ matcher: proxmenux-pbs onChange={e => updateChannel("telegram", "chat_id", e.target.value)} />
- {/* Per-channel action bar */}
+ ) : ( +

Enable Telegram using the switch on hover to configure it.

)} - +
+ )} - {/* Gotify */} - -
- - -
- {config.channels.gotify?.enabled && ( + {selectedChannel === "gotify" && ( +
+ {config.channels.gotify?.enabled ? ( <>
@@ -802,7 +855,6 @@ matcher: proxmenux-pbs
- {/* Per-channel action bar */}
+ ) : ( +

Enable Gotify using the switch on hover to configure it.

)} -
+
+ )} - {/* Discord */} - -
- - -
- {config.channels.discord?.enabled && ( + {selectedChannel === "discord" && ( +
+ {config.channels.discord?.enabled ? ( <>
@@ -862,7 +902,6 @@ matcher: proxmenux-pbs
- {/* Per-channel action bar */}
+ ) : ( +

Enable Discord using the switch on hover to configure it.

)} -
+ + )} - {/* Email */} - -
- - -
- {config.channels.email?.enabled && ( + {selectedChannel === "email" && ( +
+ {config.channels.email?.enabled ? ( <>
@@ -1003,7 +1030,6 @@ matcher: proxmenux-pbs For Gmail, use an App Password instead of your account password.

- {/* Per-channel action bar */}
+ ) : ( +

Enable Email using the switch on hover to configure it.

)} - - +
+ )} {/* Test Result */} {testResult && (