Private
Public Access
The in-page "new articles" banner is invisible from a background tab. Every authenticated page now polls a small JSON endpoint (reader:new_since, every 30s) and redraws the tab's favicon with a red dot when unread, non-hidden articles from the user's feeds have appeared since the page loaded. A reload (which is what clicking the banner does) resets the baseline and the icon. The endpoint is deliberately not scoped to the stream's current filter/tag/feed, so the tab lights up for anything new whichever page is open. Scope is the dot only: no desktop notifications, per the request. Verified in a dev server enforcing the production CSP: the icon swapped to the dotted version after a new article arrived and reset on reload. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
815 B
Python
22 lines
815 B
Python
from django.urls import path
|
|
|
|
from . import views
|
|
|
|
app_name = "reader"
|
|
|
|
urlpatterns = [
|
|
path("", views.stream, name="stream"),
|
|
path("check-new/", views.check_new_articles, name="check_new"),
|
|
path("new-since/", views.new_since, name="new_since"),
|
|
path("mark-all-read/", views.mark_all_read, name="mark_all_read"),
|
|
path("articles/<int:article_id>/", views.article_detail, name="article_detail"),
|
|
path(
|
|
"articles/<int:article_id>/inline/",
|
|
views.article_inline,
|
|
name="article_inline",
|
|
),
|
|
path("articles/<int:article_id>/toggle-read/", views.toggle_read, name="toggle_read"),
|
|
path("articles/<int:article_id>/toggle-star/", views.toggle_star, name="toggle_star"),
|
|
path("articles/<int:article_id>/toggle-saved/", views.toggle_saved, name="toggle_saved"),
|
|
]
|