Tofu/app/components/molecules/WebdavCheckReport.js
2026-09-18 01:41:02 +02:00

23 lines
630 B
JavaScript

import { html } from 'htm/preact'
// One line per diagnostic step. The outcome is carried by the words OK / ÉCHEC,
// never by colour alone.
function renderStep({ id, label, ok, detail }) {
return html`
<li class="check-step" key=${id}>
<span class="check-mark">${ok ? 'OK' : 'ÉCHEC'}</span>
<span class="check-label">${label}</span>
${detail ? html`<span class="check-detail">${detail}</span>` : null}
</li>
`
}
export function WebdavCheckReport({ steps = [] }) {
if (steps.length === 0) return null
return html`
<ol class="check-report">
${steps.map(renderStep)}
</ol>
`
}