v1.1.1: dynamische Y-Achse, Button-Farbe, deploy verbose

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 12:43:39 +02:00
parent b8b5fb3a5e
commit 6eba1be5c8
3 changed files with 10 additions and 2 deletions
+1
View File
@@ -34,6 +34,7 @@ docker buildx build \
--platform linux/amd64,linux/arm64 \
--build-arg BUILD_DATE="${BUILD_DATE}" \
--provenance=false \
--progress=plain \
-t "${FULL_IMAGE}" \
--push \
.
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "bodenfeuchte",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"type": "module",
"scripts": {
"dev": "vite dev",
+8 -1
View File
@@ -83,6 +83,13 @@
(chart.data.datasets[0] as any).pointHoverRadius = showPoints ? 4 : 0;
chart.options.scales!['x']!.min = now - range.hours * 60 * 60 * 1000;
chart.options.scales!['x']!.max = now;
if (data.length > 0) {
const values = data.map(d => d.soil_moisture);
const yMin = Math.floor(Math.min(...values) / 10) * 10;
const yMax = Math.ceil(Math.max(...values) / 10) * 10;
chart.options.scales!['y']!.min = yMin;
chart.options.scales!['y']!.max = yMin === yMax ? yMax + 10 : yMax;
}
chart.update();
}
@@ -224,7 +231,7 @@
<button
onclick={() => selectRange(i)}
class="px-5 py-1.5 border-2 border-black rounded font-bold text-sm"
style={selectedRange === i ? 'background:#2980b9; color:white;' : 'background:#FFFFDD; color:black;'}
style={selectedRange === i ? 'background:#2980b9; color:white;' : 'background:rgb(231,241,247); color:black;'}
>
{range.label}
</button>