nandi/gleanpublic⑂ Fork 0
⑂ 92019fa
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.

Add unsubscribe button to broken feed itemsUnverified

Julien Robert committed 2026-04-21T11:28:45+02:00 Browse files
92019fa parent: 016bf11
modified internal/tmpl/feeds.html +14 -6
@@ -13,16 +13,24 @@
1313 <p class="text-sm text-spot-secondary mb-6">Manage your RSS and Atom subscriptions.</p>
1414
1515 {{if .DeadFeeds}}
16-<div class="bg-spot-red/10 border border-spot-red/30 rounded-lg p-4 mb-6">
16+<div id="dead-feeds" class="bg-spot-red/10 border border-spot-red/30 rounded-lg p-4 mb-6">
1717 <h3 class="text-sm font-bold text-spot-red mb-2">Feeds with errors ({{len .DeadFeeds}})</h3>
1818 <div class="space-y-2">
1919 {{range .DeadFeeds}}
20- <div class="flex items-center justify-between text-sm">
21- <span class="text-spot-text">{{if .Title.Valid}}{{.Title.String}}{{else}}{{.FeedURL}}{{end}}</span>
22- <div class="flex items-center gap-2">
23- <span class="text-spot-red text-xs">{{.ErrorCount}} errors</span>
24- {{if .LastError.Valid}}<span class="text-spot-secondary text-xs truncate max-w-48" title="{{.LastError.String}}">{{.LastError.String}}</span>{{end}}
20+ <div class="dead-feed-item flex items-center justify-between text-sm">
21+ <div class="min-w-0 flex-1 flex items-center gap-3">
22+ <span class="text-spot-text truncate">{{if .Title.Valid}}{{.Title.String}}{{else}}{{.FeedURL}}{{end}}</span>
23+ <div class="flex items-center gap-2 shrink-0">
24+ <span class="text-spot-red text-xs">{{.ErrorCount}} errors</span>
25+ {{if .LastError.Valid}}<span class="text-spot-secondary text-xs truncate max-w-48" title="{{.LastError.String}}">{{.LastError.String}}</span>{{end}}
26+ </div>
2527 </div>
28+ <form hx-delete="/feeds/remove" hx-target="closest .dead-feed-item" hx-swap="outerHTML swap:0.3s"
29+ hx-confirm="Unsubscribe from this broken feed?" class="inline shrink-0 ml-3">
30+ {{csrfInput $.CSRFToken}}
31+ <input type="hidden" name="url" value="{{.FeedURL}}">
32+ <button type="submit" class="text-xs text-spot-secondary hover:text-spot-red transition font-bold uppercase">Unsubscribe</button>
33+ </form>
2634 </div>
2735 {{end}}
2836 </div>
@@ -13,16 +13,24 @@
13 <p class="text-sm text-spot-secondary mb-6">Manage your RSS and Atom subscriptions.</p>13 <p class="text-sm text-spot-secondary mb-6">Manage your RSS and Atom subscriptions.</p>
14 14
15 {{if .DeadFeeds}}15 {{if .DeadFeeds}}
16-<div class="bg-spot-red/10 border border-spot-red/30 rounded-lg p-4 mb-6">16+<div id="dead-feeds" class="bg-spot-red/10 border border-spot-red/30 rounded-lg p-4 mb-6">
17 <h3 class="text-sm font-bold text-spot-red mb-2">Feeds with errors ({{len .DeadFeeds}})</h3>17 <h3 class="text-sm font-bold text-spot-red mb-2">Feeds with errors ({{len .DeadFeeds}})</h3>
18 <div class="space-y-2">18 <div class="space-y-2">
19 {{range .DeadFeeds}}19 {{range .DeadFeeds}}
20- <div class="flex items-center justify-between text-sm">20+ <div class="dead-feed-item flex items-center justify-between text-sm">
21- <span class="text-spot-text">{{if .Title.Valid}}{{.Title.String}}{{else}}{{.FeedURL}}{{end}}</span>21+ <div class="min-w-0 flex-1 flex items-center gap-3">
22- <div class="flex items-center gap-2">22+ <span class="text-spot-text truncate">{{if .Title.Valid}}{{.Title.String}}{{else}}{{.FeedURL}}{{end}}</span>
23- <span class="text-spot-red text-xs">{{.ErrorCount}} errors</span>23+ <div class="flex items-center gap-2 shrink-0">
24- {{if .LastError.Valid}}<span class="text-spot-secondary text-xs truncate max-w-48" title="{{.LastError.String}}">{{.LastError.String}}</span>{{end}}24+ <span class="text-spot-red text-xs">{{.ErrorCount}} errors</span>
25+ {{if .LastError.Valid}}<span class="text-spot-secondary text-xs truncate max-w-48" title="{{.LastError.String}}">{{.LastError.String}}</span>{{end}}
26+ </div>
25 </div>27 </div>
28+ <form hx-delete="/feeds/remove" hx-target="closest .dead-feed-item" hx-swap="outerHTML swap:0.3s"
29+ hx-confirm="Unsubscribe from this broken feed?" class="inline shrink-0 ml-3">
30+ {{csrfInput $.CSRFToken}}
31+ <input type="hidden" name="url" value="{{.FeedURL}}">
32+ <button type="submit" class="text-xs text-spot-secondary hover:text-spot-red transition font-bold uppercase">Unsubscribe</button>
33+ </form>
26 </div>34 </div>
27 {{end}}35 {{end}}
28 </div>36 </div>