mirror of
https://0xacab.org/sutty/sutty
synced 2025-03-16 16:58:17 +00:00
Merge branch 'issue-13611' into production.panel.sutty.nl
This commit is contained in:
commit
f47824b4d2
4 changed files with 10 additions and 1 deletions
7
app/javascript/etc/htmx_abort.js
Normal file
7
app/javascript/etc/htmx_abort.js
Normal 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");
|
||||||
|
}
|
||||||
|
});
|
|
@ -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'
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -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'
|
||||||
|
|
Loading…
Reference in a new issue