From 37243e26c07aa2825a261db250c3692baf701183 Mon Sep 17 00:00:00 2001 From: kyaring Date: Mon, 28 Sep 2026 12:38:36 +0800 Subject: [PATCH] fix(web): fix literal newline escaping in app.js --- internal/web/static/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/web/static/app.js b/internal/web/static/app.js index 5603271..5bafa10 100644 --- a/internal/web/static/app.js +++ b/internal/web/static/app.js @@ -38,7 +38,8 @@ async function loadDevices(){ const p = d.profile || {}; const role = p.role || "APPLICATION"; const isOnline = d.status === "online"; - const statusText = isOnline ? "在线" : "离线";\n const lastText = d.last_heartbeat ? new Date(d.last_heartbeat*1000).toLocaleString() : ""; + const statusText = isOnline ? "在线" : "离线"; + const lastText = d.last_heartbeat ? new Date(d.last_heartbeat*1000).toLocaleString() : ""; const archOs = (d.arch || d.os) ? `${esc(d.arch||"")}/${esc(d.os||"")} · ` : ""; const cpuStr = p.cpu_cores ? `${p.cpu_cores}C · ${p.cpu_usage_percent ?? 0}%` : '-'; const loadStr = p.load_1m !== undefined ? p.load_1m.toFixed(2) : '-';