5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-03-16 13:48:19 +00:00

Merge branch 'issue-13611' into production.panel.sutty.nl

This commit is contained in:
f 2024-04-10 12:54:00 -03:00
commit f47824b4d2
No known key found for this signature in database
4 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,7 @@
// Cancela las peticiones pendientes de htmx para todos los elementos al
// cambiar de página.
document.addEventListener("turbolinks:click", () => {
for (const hx of document.querySelectorAll("[hx-get]")) {
window.htmx.trigger(hx, "htmx:abort");
}
});

View file

@ -6,3 +6,4 @@ import './timezone'
import './turbolinks-anchors' import './turbolinks-anchors'
import './validation' import './validation'
import './new_editor' import './new_editor'
import './htmx_abort'

View file

@ -10,7 +10,6 @@
.mb-3 .mb-3
= render 'sites/header', site: @site = render 'sites/header', site: @site
= render 'sites/status', site: @site = render 'sites/status', site: @site
= render 'sites/build', site: @site, class: 'btn-block'
= render 'sites/moderation_queue', site: @site, class: 'btn-block' = render 'sites/moderation_queue', site: @site, class: 'btn-block'
%h3= t('posts.new') %h3= t('posts.new')

View file

@ -22,3 +22,5 @@
%div{ 'hx-get': site_status_path(site), 'hx-trigger': 'every 10s', 'hx-swap': 'outerHTML' } %div{ 'hx-get': site_status_path(site), 'hx-trigger': 'every 10s', 'hx-swap': 'outerHTML' }
= render 'bootstrap/alert' do = render 'bootstrap/alert' do
= link_to_if link, message.html_safe, site_build_stats_path(site), class: 'alert-link' = link_to_if link, message.html_safe, site_build_stats_path(site), class: 'alert-link'
= render 'sites/build', site: site, class: 'btn-block'