nandi/gleanpublic⑂ Fork 0
⑂ 076805f
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Fix empty state messages and feed status logicUnverified

Julien Robert committed 2026-04-21T23:50:00+02:00 Browse files
076805f parent: 1e8c440
modified internal/server/articles_handler.go +2 -0
@@ -42,6 +42,8 @@ func (s *Server) handleArticles(w http.ResponseWriter, r *http.Request) {
4242 unreadCount, _ := s.db.GetUnreadCount(r.Context(), user.DID, feedURL)
4343 if unreadCount > 0 {
4444 status = "unread"
45+ } else {
46+ status = "all"
4547 }
4648 }
4749
@@ -42,6 +42,8 @@ func (s *Server) handleArticles(w http.ResponseWriter, r *http.Request) {
42 unreadCount, _ := s.db.GetUnreadCount(r.Context(), user.DID, feedURL)42 unreadCount, _ := s.db.GetUnreadCount(r.Context(), user.DID, feedURL)
43 if unreadCount > 0 {43 if unreadCount > 0 {
44 status = "unread"44 status = "unread"
45+ } else {
46+ status = "all"
45 }47 }
46 }48 }
47 49
modified internal/tmpl/profile.html +2 -2
@@ -37,7 +37,7 @@
3737 <svg class="w-4 h-4 text-spot-muted shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
3838 </a>
3939 {{else}}
40- <div class="px-4 py-6 text-center text-spot-secondary text-sm">No public feeds.</div>
40+ <div class="px-4 py-6 text-center text-spot-secondary text-sm">No feeds.</div>
4141 {{end}}
4242 </div>
4343
@@ -46,7 +46,7 @@
4646 {{range .Annotations}}
4747 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}
4848 {{else}}
49- <p class="text-sm text-spot-secondary text-center py-4">No public annotations.</p>
49+ <p class="text-sm text-spot-secondary text-center py-4">No annotations.</p>
5050 {{end}}
5151 </div>
5252 </div>
@@ -37,7 +37,7 @@
37 <svg class="w-4 h-4 text-spot-muted shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>37 <svg class="w-4 h-4 text-spot-muted shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
38 </a>38 </a>
39 {{else}}39 {{else}}
40- <div class="px-4 py-6 text-center text-spot-secondary text-sm">No public feeds.</div>40+ <div class="px-4 py-6 text-center text-spot-secondary text-sm">No feeds.</div>
41 {{end}}41 {{end}}
42 </div>42 </div>
43 43
@@ -46,7 +46,7 @@
46 {{range .Annotations}}46 {{range .Annotations}}
47 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}47 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}
48 {{else}}48 {{else}}
49- <p class="text-sm text-spot-secondary text-center py-4">No public annotations.</p>49+ <p class="text-sm text-spot-secondary text-center py-4">No annotations.</p>
50 {{end}}50 {{end}}
51 </div>51 </div>
52 </div>52 </div>