diff --git a/AppImage/components/notification-settings.tsx b/AppImage/components/notification-settings.tsx index 1fe8df24..beef4b4e 100644 --- a/AppImage/components/notification-settings.tsx +++ b/AppImage/components/notification-settings.tsx @@ -108,18 +108,7 @@ const CHANNEL_COLOR_MAP: Record = { indigo: "border-indigo-500/60 bg-indigo-500/10", amber: "border-amber-500/60 bg-amber-500/10", } -const CHANNEL_TEXT_COLOR: Record = { - blue: "text-blue-400", - green: "text-green-400", - indigo: "text-indigo-400", - amber: "text-amber-400", -} -const CHANNEL_MUTED_COLOR: Record = { - blue: "text-blue-500/30", - green: "text-green-500/30", - indigo: "text-indigo-500/30", - amber: "text-amber-500/30", -} + const CHANNEL_SWITCH_COLOR: Record = { blue: "bg-blue-600", green: "bg-green-600", @@ -141,98 +130,11 @@ interface ChannelDef { activeColor: string } -function ChannelLogo({ channel, className }: { channel: string; className?: string }) { - switch (channel) { - case "telegram": - return ( - - - - ) - case "gotify": - return ( - - - - ) - case "discord": - return ( - - - - ) - case "email": - return - default: - return null - } -} - -function ChannelGrid({ channels, selectedChannel, onSelectChannel, onToggleChannel }: { - channels: Record - selectedChannel: string | null - onSelectChannel: (key: string) => void - onToggleChannel: (key: string, enabled: boolean) => void -}) { - return ( -
- {CHANNEL_DEFS.map(ch => { - const isEnabled = channels[ch.key]?.enabled || false - const isSelected = selectedChannel === ch.key - - return ( - - ) - })} -
- ) +const CHANNEL_ICONS: Record = { + telegram: "/icons/telegram.svg", + gotify: "/icons/gotify.svg", + discord: "/icons/discord.svg", + email: "/icons/mail.svg", } const DEFAULT_CONFIG: NotificationConfig = { @@ -806,12 +708,58 @@ matcher: proxmenux-pbs {/* ── Channel Cards Grid ── */} - setSelectedChannel(selectedChannel === key ? null : key)} - onToggleChannel={(key, enabled) => updateChannel(key, "enabled", enabled)} - /> +
+ {CHANNEL_DEFS.map(ch => { + const chCfg = (config.channels as Record)[ch.key] + const isEnabled = chCfg?.enabled || false + const isSelected = selectedChannel === ch.key + + return ( + + ) + })} +
{/* ── Selected Channel Configuration Panel ── */} {selectedChannel === "telegram" && (