feat: notification preferences system with plugin registry

- Add NotificationType and NotificationPreference models
- Add get_notification_types() to BasePlugin for plugin registration
- Add sync_notification_types() to PluginRegistry
- Update create_notification() to check user preferences (returns Notification|None)
- Add API endpoints: GET /types, GET /preferences, PATCH /preferences/{type_key}
- Add NotificationPreferenceUpdate schema
- Mail plugin registers 10 notification types with metadata
- Add Alembic migration 0017 for new tables + seed data
- Frontend: SettingsNotifications page with toggle switches
- Frontend: Settings tab, route, hooks for notification preferences
- i18n: notification settings keys (de/en)
This commit is contained in:
Agent Zero
2026-07-15 21:00:32 +02:00
parent c4d0ec6f7f
commit b0e987f790
15 changed files with 652 additions and 11 deletions
+12 -2
View File
@@ -407,7 +407,7 @@
"testConnection": "Verbindung testen",
"connectionSuccess": "Verbindung erfolgreich.",
"syncNow": "Jetzt synchronisieren",
"syncSuccess": "{{count}} E-Mails synchronisiert.",
"syncSuccess": "Synchronisierung erfolgreich",
"selectAccount": "Account auswählen",
"selectAccountFirst": "Bitte wählen Sie zuerst einen Account aus.",
"folders": "Ordner",
@@ -560,9 +560,19 @@
"sortSubject": "Betreff",
"sortAsc": "Aufsteigend",
"sortDesc": "Absteigend",
"syncSuccess": "Synchronisierung erfolgreich",
"syncFailed": "Synchronisierung fehlgeschlagen",
"syncing": "Synchronisiere...",
"autoSyncEnabled": "Auto-Sync aktiv"
},
"notifications": {
"title": "Benachrichtigungseinstellungen",
"description": "Wählen Sie welche Benachrichtigungen Sie erhalten möchten",
"enabled": "Aktiviert",
"disabled": "Deaktiviert",
"saved": "Einstellung gespeichert",
"category": {
"mail": "E-Mail",
"general": "Allgemein"
}
}
}
+12 -2
View File
@@ -407,7 +407,7 @@
"testConnection": "Test Connection",
"connectionSuccess": "Connection successful.",
"syncNow": "Sync Now",
"syncSuccess": "{{count}} emails synced.",
"syncSuccess": "Sync successful",
"selectAccount": "Select Account",
"selectAccountFirst": "Please select an account first.",
"folders": "Folders",
@@ -560,9 +560,19 @@
"sortSubject": "Subject",
"sortAsc": "Ascending",
"sortDesc": "Descending",
"syncSuccess": "Sync successful",
"syncFailed": "Sync failed",
"syncing": "Syncing...",
"autoSyncEnabled": "Auto-sync enabled"
},
"notifications": {
"title": "Notification Settings",
"description": "Choose which notifications you want to receive",
"enabled": "Enabled",
"disabled": "Disabled",
"saved": "Preference saved",
"category": {
"mail": "Mail",
"general": "General"
}
}
}