style(webui): dashboard.js 两处表达式合并为单行

纯格式化,无语义变化:
- state.startedAt 的三元表达式(563 行附近)
- renderAll 里 Promise.all 的实参(624 行附近)

两处的表达式与参数列表逐字符相同,只是原先的换行被收拢。
已随二进制部署并验证上线:现网 `/` 返回的 HTML 里单行写法命中 1 处、
旧多行写法 0 残留。
This commit is contained in:
JianFeeeee
2026-09-27 06:44:49 +08:00
parent d3315c68ca
commit 4a231a8d4c

View File

@ -563,9 +563,7 @@ async function starmapFetchBlock(name) {
try { try {
var s = await api("/status"); var s = await api("/status");
state.status = s; state.status = s;
state.startedAt = s.startedAt state.startedAt = s.startedAt ? new Date(s.startedAt).getTime() : null;
? new Date(s.startedAt).getTime()
: null;
} catch (e) {} } catch (e) {}
break; break;
case "runtime": case "runtime":
@ -624,9 +622,7 @@ async function renderAll(force) {
if (force) _loadedOnce = {}; if (force) _loadedOnce = {};
// 1) 只拉当前页签需要的数据(并发的别串行等) // 1) 只拉当前页签需要的数据(并发的别串行等)
var needs = spec.fetch || []; var needs = spec.fetch || [];
await Promise.all( await Promise.all(needs.map((n) => starmapFetchBlock(n)));
needs.map((n) => starmapFetchBlock(n)),
);
// 2) 只渲染当前页签(+ 星图在多处出现,单独处理) // 2) 只渲染当前页签(+ 星图在多处出现,单独处理)
try { try {
spec.render.forEach((fn) => { spec.render.forEach((fn) => {