mirror of https://github.com/aredn/aredn.git
Fix occasional commit then reboot screen (#1326)
This commit is contained in:
parent
53a63886d6
commit
bb08c34948
|
@ -63,6 +63,7 @@
|
|||
Reboot required:
|
||||
<button name="reboot" value="1" hx-get="/a/status/e/reboot" hx-target="body">Reboot</button>
|
||||
</div>
|
||||
<script>clearTimeout(window.commitRefresh);</script>
|
||||
{% }
|
||||
else if (changes > 0) {
|
||||
%}
|
||||
|
@ -76,7 +77,7 @@
|
|||
htmx.on("#changes button[name=commit]", "click", e => {
|
||||
e.target.innerText = "Committing ...";
|
||||
htmx.find("#changes button[name=revert]").style.display = "none";
|
||||
setTimeout(_ => htmx.ajax("GET", "/a/changes", "#changes"), 5000);
|
||||
window.commitRefresh = setTimeout(_ => htmx.ajax("GET", "/a/changes", "#changes"), 5000);
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue