Fix bogus reboot message (#1704)

This commit is contained in:
Tim Wilkinson 2024-11-18 22:27:20 -08:00 committed by GitHub
parent 06ed425a55
commit fa6129be55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -66,11 +66,12 @@
</div>
<script>
(function(){
htmx.on("#changes button[name=commit]", "click", e => {
const commit = htmx.find("#changes button[name=commit]");
htmx.on(commit, "click", e => {
e.target.innerText = "Committing ...";
htmx.find("#changes button[name=revert]").style.display = "none";
window.commitRefresh = setTimeout(_ => htmx.ajax("GET", "/a/changes", "#changes"), 5000);
});
htmx.on(commit, "htmx:afterRequest", _ => htmx.ajax("GET", "/a/changes", "#changes"));
})();
</script>
{% }
@ -80,5 +81,4 @@
Reboot required:
<button name="reboot" value="1" hx-get="/a/status/e/reboot" hx-target="body">Reboot</button>
</div>
<script>clearTimeout(window.commitRefresh);</script>
{% } %}</div>