no message

This commit is contained in:
mh
2025-12-17 15:32:48 +01:00
parent c8d5bb3ab4
commit e99c5c0902
+34 -15
View File
@@ -152,33 +152,54 @@
const gap = c - dash; const gap = c - dash;
return ` return `
<div style="border:1px solid rgba(255,255,255,0.12);border-radius:16px;padding:14px; <div style="border:1px solid rgba(255,255,255,0.12);
display:flex;align-items:center;justify-content:center;min-height:210px;"> border-radius:16px;
padding:14px;
min-height:210px;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:10px;">
<!-- Titel oben -->
<div style="font-size:14px;font-weight:700;opacity:.9;">
${escapeHtml(title)}
</div>
<!-- Donut -->
<div style="position:relative;width:170px;height:170px;"> <div style="position:relative;width:170px;height:170px;">
<svg width="170" height="170" viewBox="0 0 170 170" style="display:block;"> <svg width="170" height="170" viewBox="0 0 170 170">
<circle cx="85" cy="85" r="${r}" <circle cx="85" cy="85" r="${r}"
fill="none" stroke="rgba(255,255,255,0.10)" stroke-width="18" /> fill="none"
stroke="rgba(255,255,255,0.10)"
stroke-width="18" />
<circle cx="85" cy="85" r="${r}" <circle cx="85" cy="85" r="${r}"
fill="none" stroke="${color}" stroke-width="18" fill="none"
stroke="${color}"
stroke-width="18"
stroke-linecap="butt" stroke-linecap="butt"
stroke-dasharray="${dash} ${gap}" stroke-dasharray="${dash} ${gap}"
transform="rotate(-90 85 85)" /> transform="rotate(-90 85 85)" />
</svg> </svg>
<div style="position:absolute;inset:0;display:flex;flex-direction:column; <!-- Prozent im Kreis -->
align-items:center;justify-content:center;text-align:center;"> <div style="position:absolute;
<div style="font-weight:800;font-size:18px;line-height:1;"> inset:0;
display:flex;
align-items:center;
justify-content:center;
font-weight:800;
font-size:22px;">
${escapeHtml(percent.toFixed(1))}% ${escapeHtml(percent.toFixed(1))}%
</div> </div>
<div style="margin-top:4px;font-size:13px;opacity:0.80;">
${escapeHtml(title)}
</div> </div>
<div style="margin-top:10px;font-size:12px;opacity:0.65;max-width:140px;">
<!-- Untertitel unten -->
<div style="font-size:12px;opacity:.65;text-align:center;">
${escapeHtml(subtitle)} ${escapeHtml(subtitle)}
</div> </div>
</div> </div>
</div>
</div>
`; `;
} }
@@ -235,8 +256,6 @@
}) })
].join(''); ].join('');
elDbg.textContent = `Letzte Daten: ${new Date().toLocaleTimeString()} · range=${data?.range ?? '-'} · date=${data?.date ?? '-'}`;
elErr.textContent = '';
} }
// --- cache --- // --- cache ---