Refresh feed list on addUnverified
ce55b7c parent: 82d1c8b modified
internal/tmpl/feeds.html +1 -1 | @@ -65,7 +65,7 @@ function gleanToggleEdit(id){var i=document.getElementById('feed-edit-'+id);if(i | ||
| 65 | 65 | <h2 class="text-sm font-bold text-spot-text uppercase tracking-wide">Add feed</h2> |
| 66 | 66 | <form hx-post="/feeds/add" hx-target="#feed-list" hx-swap="beforeend" |
| 67 | 67 | hx-on::before-request="document.getElementById('add-feed-error').textContent=''" |
| 68 | - hx-on::after-request="if(event.detail.successful)this.reset();else document.getElementById('add-feed-error').textContent=event.detail.xhr.responseText" | |
| 68 | + hx-on::after-request="if(event.detail.successful){this.reset();location.reload()}else{document.getElementById('add-feed-error').textContent=event.detail.xhr.responseText}" | |
| 69 | 69 | class="space-y-3"> |
| 70 | 70 | {{csrfInput .CSRFToken}} |
| 71 | 71 | <input type="text" name="feed_url" placeholder="https://example.com/feed.xml or at://did:plc:.../site.standard.publication/..." |
| @@ -65,7 +65,7 @@ function gleanToggleEdit(id){var i=document.getElementById('feed-edit-'+id);if(i | |||
| 65 | <h2 class="text-sm font-bold text-spot-text uppercase tracking-wide">Add feed</h2> | 65 | <h2 class="text-sm font-bold text-spot-text uppercase tracking-wide">Add feed</h2> |
| 66 | <form hx-post="/feeds/add" hx-target="#feed-list" hx-swap="beforeend" | 66 | <form hx-post="/feeds/add" hx-target="#feed-list" hx-swap="beforeend" |
| 67 | hx-on::before-request="document.getElementById('add-feed-error').textContent=''" | 67 | hx-on::before-request="document.getElementById('add-feed-error').textContent=''" |
| 68 | - hx-on::after-request="if(event.detail.successful)this.reset();else document.getElementById('add-feed-error').textContent=event.detail.xhr.responseText" | 68 | + hx-on::after-request="if(event.detail.successful){this.reset();location.reload()}else{document.getElementById('add-feed-error').textContent=event.detail.xhr.responseText}" |
| 69 | class="space-y-3"> | 69 | class="space-y-3"> |
| 70 | {{csrfInput .CSRFToken}} | 70 | {{csrfInput .CSRFToken}} |
| 71 | <input type="text" name="feed_url" placeholder="https://example.com/feed.xml or at://did:plc:.../site.standard.publication/..." | 71 | <input type="text" name="feed_url" placeholder="https://example.com/feed.xml or at://did:plc:.../site.standard.publication/..." |