(message)
| 257 | } |
| 258 | |
| 259 | function renderEmpty(message) { |
| 260 | uiState.currentReport = null; |
| 261 | byId("reportViewerTitle").textContent = "选择一篇报告"; |
| 262 | byId("reportViewerMeta").textContent = "从左侧列表打开一篇报告后,这里显示正文内容。"; |
| 263 | byId("reportViewerBody").className = "markdown-body empty"; |
| 264 | byId("reportViewerBody").textContent = message; |
| 265 | if (byId("reportMetadata")) { |
| 266 | byId("reportMetadata").className = "settings-list empty"; |
| 267 | byId("reportMetadata").textContent = "暂无元数据。"; |
| 268 | } |
| 269 | ["openReportAbsBtn", "openReportPdfBtn", "openReportDocBtn", "copyReportPathBtn"].forEach((id) => { |
| 270 | const button = byId(id); |
| 271 | button.disabled = true; |
| 272 | delete button.dataset.href; |
| 273 | delete button.dataset.path; |
| 274 | }); |
| 275 | } |
| 276 | |
| 277 | function renderViewer(report) { |
| 278 | uiState.currentReport = report; |
no test coverage detected