release-3.0

This commit is contained in:
2026-05-02 21:04:20 +02:00
parent 1171de2790
commit c3e8551300
3 changed files with 269 additions and 236 deletions

View File

@@ -231,6 +231,25 @@ async function fetchWeather() {
const bar = document.getElementById('c-rain-bar');
if (bar && data.rain_prob != null) bar.style.width = `${data.rain_prob}%`;
// Rain forecast line
const forecastEl = document.getElementById('c-rain-forecast');
if (forecastEl && data.rain_prob != null) {
const p = data.rain_prob;
if (p <= 10) {
forecastEl.textContent = 'Kein Regen in Sicht — weiterhin trocken';
forecastEl.className = 'c-rain-forecast';
} else if (p <= 30) {
forecastEl.textContent = `${p} % Regenwahrscheinlichkeit — überwiegend trocken`;
forecastEl.className = 'c-rain-forecast';
} else if (p <= 60) {
forecastEl.textContent = `${p} % Regenwahrscheinlichkeit — möglicherweise Regen`;
forecastEl.className = 'c-rain-forecast has-rain';
} else {
forecastEl.textContent = `${p} % Regenwahrscheinlichkeit — Regen wahrscheinlich`;
forecastEl.className = 'c-rain-forecast has-rain';
}
}
} catch(e) {
console.warn('[Mirror] Weather error:', e);
}
@@ -309,7 +328,7 @@ async function poll() {
`<span class="log-raw">${e.raw}</span>` +
(num ? `<span class="log-num">${num}</span>` : '<span></span>');
logPane.prepend(row);
while (logPane.children.length > 100) logPane.removeChild(logPane.lastChild);
while (logPane.children.length > 30) logPane.removeChild(logPane.lastChild);
});
/* Alerts */