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:
parent
0d73ae88e1
commit
c1b9811dce
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue