Bigger unread badge with a real count, and a Clear all action for notifications
The header bell's unread indicator was an 8px dot -- now a proper count badge (capped at "9+"), matching the size/legibility of similar badges elsewhere in the app. Notifications also gains "Clear all" next to "Mark all read" -- a hard delete of the list (the same clear-all gesture a phone's own notification centre uses), not another read-state flip. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
@@ -755,6 +755,13 @@ class NotificationsView(PersonScopeMixin, LoginRequiredMixin, TemplateView):
|
||||
Notification.objects.filter(club=request.club, member__in=self.managed_people, read_at__isnull=True).update(read_at=timezone.now())
|
||||
return HttpResponseRedirect(reverse("mobile:notifications"))
|
||||
|
||||
if action == "clear_all":
|
||||
# A hard delete, not another read-state flip -- "Clear" empties the
|
||||
# list itself, same as the clear-all gesture in a phone's own
|
||||
# notification centre, rather than just marking everything read.
|
||||
Notification.objects.filter(club=request.club, member__in=self.managed_people).delete()
|
||||
return HttpResponseRedirect(reverse("mobile:notifications"))
|
||||
|
||||
if action == "mark_read":
|
||||
notification = Notification.objects.filter(pk=request.POST.get("notification_id"), club=request.club, member__in=self.managed_people).first()
|
||||
if notification is None:
|
||||
|
||||
Reference in New Issue
Block a user