Private
Public Access
Show each tag's total unread count and remember collapsed sections
Closes gitea#24: the sidebar's per-feed unread counts were already computed by sidebar() (apps.core.context_processors); each tag group's total is now the sum of its own feeds' counts (a feed can carry more than one tag, so this reuses the same per-feed data rather than a second query) and renders next to the tag name like a feed's own count. Closes gitea#25: each sidebar <details> section (one per tag, plus "Untagged") now carries a stable data-sidebar-key, and static/js/sidebar-state.js remembers which ones are collapsed in localStorage — this isn't a SPA, so every click re-renders the sidebar server-side, and previously every section reset back to expanded on the next page load. Per-browser, same pattern as theme.js/theme-init.js, not synced across devices/accounts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9439f9cc59
commit
e760eeda1d
7 files changed
+186
-6
No files matched your search
@@ -299,6 +299,16 @@ form p {
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
/* An inner wrapper, not `summary` itself — `summary`'s native disclosure
|
||||
triangle only renders with its default `display: list-item`, so the
|
||||
flex layout for the tag name + unread count lives one level in. */
|
||||
.sidebar-tag-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
|
||||
.sidebar-tag-link {
|
||||
display: inline-block;
|
||||
padding: 0.15rem 0.4rem;
|
||||
|
||||
Reference in new issue
Block a user