fcefd0978f
- Add UserNotificationTarget, UserNotificationPreference, InAppNotification models - Add migration 025_add_user_notifications (tables + indexes) - Add app/utils/user_notification.py dispatch service - Add app/api/notifications.py REST endpoints (inbox, targets, preferences) - Add app/views/notifications.py view route - Add frontend/templates/notifications_dashboard.html Alpine.js dashboard - Add bell icon with unread badge in base.html nav (desktop + mobile) - Register routers in app/api/__init__.py and app/views/__init__.py - Add 32 unit tests in tests/test_notifications_api.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
21 lines
510 B
Python
21 lines
510 B
Python
"""View route for the notifications dashboard."""
|
|
|
|
import logging
|
|
|
|
from fastapi import Request
|
|
|
|
from app.views.base import APIRouter, require_login, templates
|
|
|
|
logger = logging.getLogger(__name__)
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/notifications")
|
|
@require_login
|
|
async def notifications_dashboard(request: Request):
|
|
"""Render the notifications dashboard."""
|
|
return templates.TemplateResponse(
|
|
"notifications_dashboard.html",
|
|
{"request": request, "page_title": "Notifications"},
|
|
)
|