stricter linting

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-04-25 15:05:25 +02:00
parent 56a2ebf973
commit 494af629d0
6 changed files with 15 additions and 14 deletions
+3 -3
View File
@@ -25,8 +25,8 @@ class ConnectionMonitorState {
static setData({ online, data }) {
if (online !== this.online) {
this.online = online;
this.ts = new Date()
debug('monitorState', { online: ConnectionMonitorState.online, ts: ConnectionMonitorState.ts })
this.ts = new Date();
debug('monitorState', { online: ConnectionMonitorState.online, ts: ConnectionMonitorState.ts });
}
if (data?.updated) this.version = data.updated;
if (data?.commit) this.commit = data.commit;
@@ -98,7 +98,7 @@ async function monitorConnection() {
ConnectionMonitorState.startup = new Date();
ConnectionMonitorState.url = res.url.split('/sdapi')[0].replace('https:', 'wss:').replace('http:', 'ws:'); // update global url as ws need fqdn
updateIndicator(true, data);
wsMonitorLoop(url);
wsMonitorLoop();
} catch {
updateIndicator(false, data);
setTimeout(monitorConnection, ConnectionMonitorState.delay);
+3 -3
View File
@@ -601,14 +601,14 @@ function monitorServerStatus() {
document.close();
}
const delay = ms => new Promise((resolve) => setTimeout(resolve, ms));
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); // eslint-disable-line no-promise-executor-return
async function restartReload(initial=true) {
async function restartReload(initial = true) {
document.body.style = 'background: #222222; font-size: 1rem; font-family:monospace; margin-top:20%; color:lightgray; text-align:center';
document.body.innerHTML = '<h1>Server shutdown in progress...</h1>';
if (initial) await delay(10000);
try {
const res = await authFetch(`${window.api}/progress?skip_current_image=true`)
const res = await authFetch(`${window.api}/progress?skip_current_image=true`);
console.log('restartReload', res);
if (res?.ok) {
document.body.innerHTML = '<h1>Server restart in progress...</h1>';