A social RSS reader built on the AT Protocol. glean.at
glean atproto atmosphere rss feed social app
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

Display error when adding feed error

+5 -1
+5 -1
internal/tmpl/feeds.html
··· 56 56 <div class="space-y-6"> 57 57 <div class="bg-spot-surface rounded-xl p-4 space-y-4"> 58 58 <h2 class="text-sm font-bold text-spot-text uppercase tracking-wide">Add feed</h2> 59 - <form hx-post="/feeds/add" hx-target="#feed-list" hx-swap="beforeend" class="space-y-3"> 59 + <form hx-post="/feeds/add" hx-target="#feed-list" hx-swap="beforeend" 60 + hx-on::before-request="document.getElementById('add-feed-error').textContent=''" 61 + hx-on::after-request="if(event.detail.successful)this.reset();else document.getElementById('add-feed-error').textContent=event.detail.xhr.responseText" 62 + class="space-y-3"> 60 63 {{csrfInput .CSRFToken}} 61 64 <input type="url" name="feed_url" placeholder="https://example.com/feed.xml" 62 65 class="w-full bg-spot-hover text-spot-text rounded-pill px-5 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-spot-green placeholder:text-spot-placeholder" ··· 65 68 class="w-full bg-spot-hover text-spot-text rounded-pill px-5 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-spot-green placeholder:text-spot-placeholder"> 66 69 <button type="submit" class="w-full bg-spot-green text-white rounded-pill px-5 py-2 text-sm font-bold uppercase tracking-button hover:brightness-110 transition">Add</button> 67 70 </form> 71 + <div id="add-feed-error" class="text-sm text-spot-red"></div> 68 72 <div class="border-t border-spot-divider pt-4 space-y-3"> 69 73 <h2 class="text-xs text-spot-secondary font-bold uppercase tracking-wide">Import / Export</h2> 70 74 <form hx-post="/feeds/opml/upload" hx-encoding="multipart/form-data" class="flex flex-col gap-2">