1
0
Fork 0
mirror of https://github.com/mat-1/matdoesdev.git synced 2025-08-02 23:44:39 +00:00

make reboot functional

This commit is contained in:
mat 2025-03-29 01:47:57 +00:00
commit c1b9811dce

View file

@ -24,7 +24,6 @@
return `${hours}h ${minutes}m ${seconds}s`
}
function reboot() {}
async function shutdown() {
await fetch('/admin/api/shutdown', { method: 'POST' })
// shutdown animation
@ -32,6 +31,12 @@
await new Promise((resolve) => setTimeout(resolve, 3000))
location.reload()
}
async function reboot() {
await fetch('/admin/api/reboot', { method: 'POST' })
document.body.classList.add('shutdown')
await new Promise((resolve) => setTimeout(resolve, 3000))
location.reload()
}
let logsEl: HTMLDivElement