feat(notifications): build per-user notification system (email, webhook, in-app)
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -71,6 +71,9 @@ def _send_email_notification(target_config: dict[str, Any], title: str, message:
|
|||||||
smtp_password, smtp_use_tls, recipient_email
|
smtp_password, smtp_use_tls, recipient_email
|
||||||
title: Email subject
|
title: Email subject
|
||||||
message: Email body text
|
message: Email body text
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
True if the email was sent successfully, False otherwise.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
smtp_host = target_config.get("smtp_host", "")
|
smtp_host = target_config.get("smtp_host", "")
|
||||||
@@ -113,6 +116,9 @@ def _send_webhook_notification(target_config: dict[str, Any], event_type: str, t
|
|||||||
event_type: The event type string
|
event_type: The event type string
|
||||||
title: Notification title
|
title: Notification title
|
||||||
message: Notification body
|
message: Notification body
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
True if the webhook was delivered successfully, False otherwise.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
url = target_config.get("url", "")
|
url = target_config.get("url", "")
|
||||||
|
|||||||
@@ -204,8 +204,7 @@
|
|||||||
<i class="fas fa-bell" aria-hidden="true"></i>
|
<i class="fas fa-bell" aria-hidden="true"></i>
|
||||||
<span id="notificationBadge"
|
<span id="notificationBadge"
|
||||||
class="hidden absolute -top-1 -right-1 h-4 w-4 rounded-full bg-red-500 text-white text-xs flex items-center justify-center font-bold"
|
class="hidden absolute -top-1 -right-1 h-4 w-4 rounded-full bg-red-500 text-white text-xs flex items-center justify-center font-bold"
|
||||||
aria-live="polite"
|
aria-live="polite"></span>
|
||||||
aria-label="unread notifications count"></span>
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Dark mode toggle -->
|
<!-- Dark mode toggle -->
|
||||||
|
|||||||
Reference in New Issue
Block a user