mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-04 20:50:06 +00:00
81 lines
2.1 KiB
HTML
81 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Knip Report</title>
|
|
<style>
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
|
|
padding: 2rem;
|
|
background: #1a1a1a;
|
|
color: #f0f0f0;
|
|
line-height: 1.6;
|
|
}
|
|
h1 {
|
|
color: #4a9eff;
|
|
border-bottom: 3px solid #4a9eff;
|
|
padding-bottom: 1rem;
|
|
}
|
|
.status {
|
|
display: inline-block;
|
|
padding: 0.5rem 1rem;
|
|
margin: 1rem 0;
|
|
border-radius: 6px;
|
|
font-weight: 500;
|
|
}
|
|
.error {
|
|
background: #d32f2f;
|
|
color: #ffebee;
|
|
}
|
|
.loading {
|
|
background: #f57c00;
|
|
color: #fff3e0;
|
|
}
|
|
#content {
|
|
background: #2a2a2a;
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
border: 1px solid #404040;
|
|
}
|
|
</style>
|
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js" defer></script>
|
|
</head>
|
|
<body>
|
|
<h1>🧹 Knip Code Quality Report</h1>
|
|
|
|
<div id="status" class="status loading">Loading report...</div>
|
|
|
|
<div id="content"></div>
|
|
|
|
<script>
|
|
async function loadReport() {
|
|
const statusEl = document.getElementById('status')
|
|
const contentEl = document.getElementById('content')
|
|
|
|
try {
|
|
const response = await fetch('./knip/report.md')
|
|
|
|
if (!response.ok) {
|
|
throw new Error(`HTTP ${response.status}: ${response.statusText}`)
|
|
}
|
|
|
|
const reportText = await response.text()
|
|
statusEl.style.display = 'none'
|
|
if (window.marked) {
|
|
contentEl.innerHTML = window.marked.parse(reportText)
|
|
} else {
|
|
contentEl.innerHTML = `<pre>${reportText}</pre>`
|
|
}
|
|
} catch (error) {
|
|
statusEl.className = 'status error'
|
|
statusEl.textContent = `Failed to load report: ${error.message}`
|
|
|
|
contentEl.innerHTML = '<p>The Knip report could not be loaded. This might happen if:</p><ul><li>The report generation failed during build</li><li>No unused code was detected</li><li>Network connectivity issues</li></ul>'
|
|
}
|
|
}
|
|
|
|
loadReport()
|
|
</script>
|
|
</body>
|
|
</html>
|