🐛 修复定时任务日志状态显示

- 状态检查同时支持success和completed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-10 20:15:05 +08:00
parent cd118f28db
commit 9df2122fb5

View File

@@ -1336,8 +1336,9 @@
} else { } else {
let html = "<div style=\"display: flex; flex-direction: column; gap: 12px;\">"; let html = "<div style=\"display: flex; flex-direction: column; gap: 12px;\">";
logs.forEach(log => { logs.forEach(log => {
const statusClass = log.status === "success" ? "status-completed" : (log.status === "failed" ? "status-error" : "status-running"); const isSuccess = log.status === "success" || log.status === "completed";
const statusText = log.status === "success" ? "成功" : (log.status === "failed" ? "失败" : "进行中"); const statusClass = isSuccess ? "status-completed" : (log.status === "failed" ? "status-error" : "status-running");
const statusText = isSuccess ? "成功" : (log.status === "failed" ? "失败" : "进行中");
html += "<div style=\"border: 1px solid var(--md-divider); border-radius: 8px; padding: 12px; background: var(--md-surface);\">" + html += "<div style=\"border: 1px solid var(--md-divider); border-radius: 8px; padding: 12px; background: var(--md-surface);\">" +
"<div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;\">" + "<div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;\">" +
"<span style=\"font-size: 14px; color: var(--md-on-surface-medium);\">" + (log.created_at || "") + "</span>" + "<span style=\"font-size: 14px; color: var(--md-on-surface-medium);\">" + (log.created_at || "") + "</span>" +