chore: last frontend style nits — http case in common.js, setTimeout wrappers
- common.js fetchStateFile: 'HTTP' -> 'http' — last uppercase instance in the frontend (tabs.js, app.js, logs.js already fixed in prior PRs) - tabs.js: two redundant arrow wrappers in setTimeout dropped — setTimeout(() => f(), N) -> setTimeout(f, N) where f takes no args
This commit is contained in:
parent
db50da570a
commit
07e729ae24
2 changed files with 3 additions and 3 deletions
|
|
@ -387,7 +387,7 @@ export const Panel = (() => {
|
||||||
async function fetchStateFile(path) {
|
async function fetchStateFile(path) {
|
||||||
const resp = await fetch('/api/state-file?path=' + encodeURIComponent(path));
|
const resp = await fetch('/api/state-file?path=' + encodeURIComponent(path));
|
||||||
const text = await resp.text();
|
const text = await resp.text();
|
||||||
if (!resp.ok) throw new Error(text || ('HTTP ' + resp.status));
|
if (!resp.ok) throw new Error(text || ('http ' + resp.status));
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
// A 2-tab file preview: a "rendered" tab (default) + a raw-text tab.
|
// A 2-tab file preview: a "rendered" tab (default) + a raw-text tab.
|
||||||
|
|
|
||||||
|
|
@ -1281,7 +1281,7 @@ window.marked = marked;
|
||||||
saveBtn.title = txt;
|
saveBtn.title = txt;
|
||||||
} else {
|
} else {
|
||||||
saveBtn.textContent = '✓';
|
saveBtn.textContent = '✓';
|
||||||
setTimeout(() => fetchAndRenderToolGroups(), 800);
|
setTimeout(fetchAndRenderToolGroups, 800);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
saveBtn.textContent = 'err';
|
saveBtn.textContent = 'err';
|
||||||
|
|
@ -3218,7 +3218,7 @@ window.marked = marked;
|
||||||
}
|
}
|
||||||
// Hold the flash briefly so the operator can read it before the
|
// Hold the flash briefly so the operator can read it before the
|
||||||
// refresh wipes the row in place.
|
// refresh wipes the row in place.
|
||||||
setTimeout(() => { refreshSchedules(); }, 1500);
|
setTimeout(refreshSchedules, 1500);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert('fire-now failed: ' + err);
|
alert('fire-now failed: ' + err);
|
||||||
restoreBtn();
|
restoreBtn();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue