mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Refactor login redirection logic in setup.html
This commit is contained in:
parent
12714a7702
commit
e6ee3f0a42
1 changed files with 11 additions and 9 deletions
20
src/ui/templates/setup.html
vendored
20
src/ui/templates/setup.html
vendored
|
|
@ -629,16 +629,18 @@
|
|||
setTimeout(() => {
|
||||
window.open(`${api}/login`, "_self");
|
||||
}, 60000);
|
||||
setInterval(() => {
|
||||
fetch(`${api}/check`, {
|
||||
cache: "no-cache",
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
window.open(`${api}/login`, "_self");
|
||||
}
|
||||
setTimeout(() => {
|
||||
setInterval(() => {
|
||||
fetch(`${api}/check`, {
|
||||
cache: "no-cache",
|
||||
})
|
||||
.catch((err) => {});
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
window.open(`${api}/login`, "_self");
|
||||
}
|
||||
})
|
||||
.catch((err) => {});
|
||||
}, 1000);
|
||||
}, 5000);
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue