feat: instant notifications + Notifications screen

- NotificationPoller polls every 30s while app is in foreground
- Poller auto-starts on resume, stops on pause
- New NotificationsScreen with mark-as-read, mark-all-read, infinite scroll
- Bottom nav: Alerts tab with unread badge
- Dashboard: bell icon with unread badge
- Backend: GET /api/notifications/unread-count endpoint
- App version 1.1.0
This commit is contained in:
2026-06-09 17:51:55 -04:00
parent d1c36d4642
commit a43e0ae3a4
12 changed files with 559 additions and 18 deletions

View File

@@ -496,6 +496,19 @@ class ApiController
]);
}
public function unreadCount(): void
{
$user = $this->authenticateRequest();
$notificationModel = new \ServerManager\Models\Notification();
$count = $notificationModel->getUnreadCount((int) $user['id']);
$this->view->json([
'success' => true,
'unread_count' => $count,
]);
}
public function notifications(): void
{
$user = $this->authenticateRequest();