diff --git a/beszel/site/src/components/routes/settings/notifications.tsx b/beszel/site/src/components/routes/settings/notifications.tsx
index d023188..189d30a 100644
--- a/beszel/site/src/components/routes/settings/notifications.tsx
+++ b/beszel/site/src/components/routes/settings/notifications.tsx
@@ -4,12 +4,46 @@ import { Label } from '@/components/ui/label'
import { pb } from '@/lib/stores'
import { Separator } from '@/components/ui/separator'
import { Card } from '@/components/ui/card'
-// import { Switch } from '@/components/ui/switch'
import { LoaderCircleIcon, PlusIcon, SaveIcon, Trash2Icon } from 'lucide-react'
import { useState } from 'react'
import { toast } from '@/components/ui/use-toast'
-export default function SettingsNotificationsPage() {
+interface UserSettings {
+ webhooks: string[]
+}
+
+interface ShoutrrrUrlCardProps {
+ url: string
+ onUrlChange: (value: string) => void
+ onRemove: () => void
+}
+
+const userSettings: UserSettings = {
+ webhooks: ['generic://webhook.site/xxx'],
+}
+
+const SettingsNotificationsPage = () => {
+ const [email, setEmail] = useState(pb.authStore.model?.email || '')
+ const [webhooks, setWebhooks] = useState(userSettings.webhooks ?? [])
+
+ const addWebhook = () => setWebhooks([...webhooks, ''])
+ const removeWebhook = (index: number) => setWebhooks(webhooks.filter((_, i) => i !== index))
+
+ const updateWebhook = (index: number, value: string) => {
+ const newWebhooks = [...webhooks]
+ newWebhooks[index] = value
+ setWebhooks(newWebhooks)
+ }
+
+ const saveSettings = async () => {
+ // TODO: Implement actual saving logic
+ console.log('Saving settings:', { email, webhooks })
+ toast({
+ title: 'Settings saved',
+ description: 'Your notification settings have been updated.',
+ })
+ }
+
return (
{/*
@@ -22,11 +56,15 @@ export default function SettingsNotificationsPage() {
Email notifications
- Leave the emails field to disable email notifications.
+ Leave blank to disable email notifications.
-
+
setEmail(e.target.value)}
+ />
Separate multiple emails with commas.
@@ -47,20 +85,31 @@ export default function SettingsNotificationsPage() {
to integrate with popular notification services.
-
+ {webhooks.length > 0 && (
+
+ {webhooks.map((webhook, index) => (
+ updateWebhook(index, value)}
+ onRemove={() => removeWebhook(index)}
+ />
+ ))}
+
+ )}
-