From ec540e056d55c538607b3f5e1265c0a1cabfed62 Mon Sep 17 00:00:00 2001 From: David Fencl Date: Sat, 6 Jun 2026 21:04:19 +0200 Subject: [PATCH] feat: implement weather radar component and update water resource data records. before river --- public/data/BIBI.json | 11 +- public/data/BLHU.json | 29 ++++- public/data/CPDR.json | 11 +- public/data/CPZA.json | 20 ++- public/data/CRSO.json | 29 ++++- public/data/HESE.json | 22 +++- public/data/HEVR.json | 22 +++- public/data/KCKC.json | 29 ++++- public/data/KLDP.json | 29 ++++- public/data/KLHP.json | 29 ++++- public/data/KLKL.json | 29 ++++- public/data/LILA.json | 11 +- public/data/MARI.json | 29 ++++- public/data/MZHR.json | 29 ++++- public/data/MZLU.json | 29 ++++- public/data/OPOB.json | 13 +- public/data/PPPI.json | 2 +- public/data/RACU.json | 29 ++++- public/data/SAPI.json | 11 +- public/data/SCHU.json | 20 ++- public/data/SMSM.json | 11 +- public/data/SPKA.json | 20 ++- public/data/SPNE.json | 20 ++- public/data/SPZH.json | 20 ++- public/data/STST.json | 20 ++- public/data/STZL.json | 11 +- public/data/SVSV.json | 13 +- public/data/TRTR.json | 29 ++++- public/data/UHNY.json | 20 ++- public/data/VLHN.json | 20 ++- public/data/VLKA.json | 20 ++- public/data/VLKO.json | 20 ++- public/data/VLL1.json | 20 ++- public/data/VLL2.json | 24 +++- public/data/VLOR.json | 29 ++++- public/data/VLSL.json | 29 ++++- public/data/VLST.json | 20 ++- public/data/VLVE.json | 20 ++- public/data/ZESV.json | 29 ++++- public/data/lakes_index.json | 178 +++++++++++++-------------- scripts/watchData.ts | 6 +- src/App.css | 62 +++++----- src/App.tsx | 6 +- src/components/FavoritesOverview.tsx | 1 + src/components/LakesOverview.tsx | 1 + src/components/Sidebar.tsx | 27 ++-- src/components/Tooltip.tsx | 86 ++++++++++--- src/components/WeatherRadar.tsx | 39 ++++++ src/translations.ts | 2 + 49 files changed, 1038 insertions(+), 198 deletions(-) create mode 100644 src/components/WeatherRadar.tsx diff --git a/public/data/BIBI.json b/public/data/BIBI.json index 51a9d63..08144b5 100644 --- a/public/data/BIBI.json +++ b/public/data/BIBI.json @@ -6800,7 +6800,16 @@ "flow": 0, "inflow": 0, "volume": 0, - "temperature": 19, + "temperature": 20.2, + "precipitation": 0.1 + }, + { + "timestamp": "2026-06-06T18:45:00.000Z", + "level": 463.42, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 18.5, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/BLHU.json b/public/data/BLHU.json index c9b2099..39e2a6c 100644 --- a/public/data/BLHU.json +++ b/public/data/BLHU.json @@ -6816,9 +6816,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 521.29, "flow": 0.65, + "inflow": 0, + "volume": 0, + "temperature": 18.7, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 521.29, + "flow": 0.64, + "inflow": 0, + "volume": 0, + "temperature": 18.7, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 521.29, + "flow": 0.63, + "inflow": 0, + "volume": 0, + "temperature": 18.7, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 521.29, + "flow": 0.63, "inflow": 0.92, "volume": 2.44, - "temperature": 17.2, + "temperature": 16.7, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/CPDR.json b/public/data/CPDR.json index 5a04d66..caa648c 100644 --- a/public/data/CPDR.json +++ b/public/data/CPDR.json @@ -6826,8 +6826,17 @@ "level": 416.74, "flow": 0, "inflow": 0, + "volume": 0, + "temperature": 20.7, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 416.74, + "flow": 0, + "inflow": 0, "volume": 0.09, - "temperature": 18.8, + "temperature": 18, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/CPZA.json b/public/data/CPZA.json index 316b6dd..f3d4094 100644 --- a/public/data/CPZA.json +++ b/public/data/CPZA.json @@ -6826,8 +6826,26 @@ "level": 448.82, "flow": 0, "inflow": 0, + "volume": 0, + "temperature": 20.6, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 448.82, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 20.6, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 448.82, + "flow": 0, + "inflow": 0, "volume": 0.67, - "temperature": 18.8, + "temperature": 18, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/CRSO.json b/public/data/CRSO.json index f184a48..c8de8bd 100644 --- a/public/data/CRSO.json +++ b/public/data/CRSO.json @@ -6781,8 +6781,35 @@ "level": 581.35, "flow": 0, "inflow": 0, + "volume": 0, + "temperature": 19.6, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:10:00.000Z", + "level": 581.35, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 19.6, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:20:00.000Z", + "level": 581.35, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 19.6, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 581.34, + "flow": 0, + "inflow": 0, "volume": 0.04, - "temperature": 18.3, + "temperature": 17.5, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/HESE.json b/public/data/HESE.json index accdf0f..0412cc9 100644 --- a/public/data/HESE.json +++ b/public/data/HESE.json @@ -6806,7 +6806,7 @@ { "timestamp": "2026-06-06T18:10:00.000Z", "level": 447.02, - "flow": 0, + "flow": 0.24, "inflow": 0, "volume": 0, "temperature": 19.9, @@ -6815,10 +6815,28 @@ { "timestamp": "2026-06-06T18:20:00.000Z", "level": 447.02, + "flow": 0.25, + "inflow": 0, + "volume": 0, + "temperature": 19.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 447.02, + "flow": 0.26, + "inflow": 0, + "volume": 0, + "temperature": 19.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 447.02, "flow": 0, "inflow": 1.08, "volume": 1.65, - "temperature": 18.5, + "temperature": 17.8, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/HEVR.json b/public/data/HEVR.json index 7aa92ab..cd46c26 100644 --- a/public/data/HEVR.json +++ b/public/data/HEVR.json @@ -6815,7 +6815,7 @@ { "timestamp": "2026-06-06T18:20:00.000Z", "level": 407.64, - "flow": 0, + "flow": 0.2, "inflow": 0, "volume": 0, "temperature": 19.4, @@ -6824,10 +6824,28 @@ { "timestamp": "2026-06-06T18:30:00.000Z", "level": 407.64, + "flow": 0.2, + "inflow": 0, + "volume": 0, + "temperature": 19.4, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 407.64, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 19.4, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 407.64, "flow": 0, "inflow": 0.42, "volume": 0.14, - "temperature": 17.9, + "temperature": 17.3, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/KCKC.json b/public/data/KCKC.json index 9bfc091..3787d18 100644 --- a/public/data/KCKC.json +++ b/public/data/KCKC.json @@ -6816,9 +6816,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 292.9, "flow": 0.02, + "inflow": 0, + "volume": 0, + "temperature": 20.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 292.9, + "flow": 0.02, + "inflow": 0, + "volume": 0, + "temperature": 20.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 292.9, + "flow": 0.02, + "inflow": 0, + "volume": 0, + "temperature": 20.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 0, + "flow": 0.02, "inflow": 0.01, "volume": 7.49, - "temperature": 19.1, + "temperature": 18.3, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/KLDP.json b/public/data/KLDP.json index 002e9f7..3b3d6eb 100644 --- a/public/data/KLDP.json +++ b/public/data/KLDP.json @@ -6782,7 +6782,34 @@ "flow": 0, "inflow": 0, "volume": 0, - "temperature": 17.8, + "temperature": 18.5, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:10:00.000Z", + "level": 632.77, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 18.5, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:20:00.000Z", + "level": 632.77, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 18.5, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 632.77, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 17.4, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/KLHP.json b/public/data/KLHP.json index be30a42..ca53d4b 100644 --- a/public/data/KLHP.json +++ b/public/data/KLHP.json @@ -6782,7 +6782,34 @@ "flow": 0, "inflow": 0, "volume": 0, - "temperature": 18.1, + "temperature": 18.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:10:00.000Z", + "level": 635.7, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 18.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:20:00.000Z", + "level": 635.7, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 18.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 635.7, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 17.7, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/KLKL.json b/public/data/KLKL.json index 8872e3f..c0e6033 100644 --- a/public/data/KLKL.json +++ b/public/data/KLKL.json @@ -6816,9 +6816,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 345, "flow": 1.5, + "inflow": 0, + "volume": 0, + "temperature": 21, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 345, + "flow": 1.5, + "inflow": 0, + "volume": 0, + "temperature": 21, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 345, + "flow": 1.5, + "inflow": 0, + "volume": 0, + "temperature": 21, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 345, + "flow": 1.5, "inflow": 1.06, "volume": 0.66, - "temperature": 20.3, + "temperature": 20, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/LILA.json b/public/data/LILA.json index 24622d3..6665318 100644 --- a/public/data/LILA.json +++ b/public/data/LILA.json @@ -6825,9 +6825,18 @@ "timestamp": "2026-06-06T18:30:00.000Z", "level": 640.67, "flow": 0.01, + "inflow": 0, + "volume": 0, + "temperature": 18.4, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 640.67, + "flow": 0.01, "inflow": 0.02, "volume": 0.73, - "temperature": 17.8, + "temperature": 17.6, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/MARI.json b/public/data/MARI.json index 83be88a..a9a25f6 100644 --- a/public/data/MARI.json +++ b/public/data/MARI.json @@ -7130,10 +7130,37 @@ { "timestamp": "2026-06-06T18:20:00.000Z", "level": 467.75, + "flow": 0.7, + "inflow": 0, + "volume": 0, + "temperature": 20.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 467.75, + "flow": 0.7, + "inflow": 0, + "volume": 0, + "temperature": 20.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 467.76, + "flow": 0.7, + "inflow": 0, + "volume": 0, + "temperature": 20.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 467.76, "flow": 0, "inflow": 2.24, "volume": 26.54, - "temperature": 19.4, + "temperature": 18.8, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/MZHR.json b/public/data/MZHR.json index 3ddbfb6..5293f5a 100644 --- a/public/data/MZHR.json +++ b/public/data/MZHR.json @@ -7140,9 +7140,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 352.83, "flow": 2.52, + "inflow": 0, + "volume": 0, + "temperature": 21, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 352.84, + "flow": 2.52, + "inflow": 0, + "volume": 0, + "temperature": 21, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 352.84, + "flow": 2.52, + "inflow": 0, + "volume": 0, + "temperature": 21, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 352.83, + "flow": 0, "inflow": 1.47, "volume": 32.28, - "temperature": 20.1, + "temperature": 19.8, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/MZLU.json b/public/data/MZLU.json index 8b3cc3e..8990083 100644 --- a/public/data/MZLU.json +++ b/public/data/MZLU.json @@ -6816,9 +6816,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 530.7, "flow": 0.49, + "inflow": 0, + "volume": 0, + "temperature": 19.4, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 530.7, + "flow": 0.49, + "inflow": 0, + "volume": 0, + "temperature": 19.4, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 530.7, + "flow": 0.49, + "inflow": 0, + "volume": 0, + "temperature": 19.4, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 530.7, + "flow": 0.49, "inflow": 0.48, "volume": 2.94, - "temperature": 18.3, + "temperature": 17.9, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/OPOB.json b/public/data/OPOB.json index 7eec71f..9e9064a 100644 --- a/public/data/OPOB.json +++ b/public/data/OPOB.json @@ -6823,11 +6823,20 @@ }, { "timestamp": "2026-06-06T18:30:00.000Z", - "level": 0, + "level": 563.67, + "flow": 0.01, + "inflow": 0, + "volume": 0, + "temperature": 19.5, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 563.67, "flow": 0.01, "inflow": 0.02, "volume": 0.46, - "temperature": 18.3, + "temperature": 17.8, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/PPPI.json b/public/data/PPPI.json index cf75f86..f4cb80d 100644 --- a/public/data/PPPI.json +++ b/public/data/PPPI.json @@ -6746,7 +6746,7 @@ "flow": 0, "inflow": 0, "volume": 0, - "temperature": 17.6, + "temperature": 17.1, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/RACU.json b/public/data/RACU.json index c34c2e3..3d9fe9f 100644 --- a/public/data/RACU.json +++ b/public/data/RACU.json @@ -6816,9 +6816,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 313.39, "flow": 2.84, + "inflow": 0, + "volume": 0, + "temperature": 21.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 313.39, + "flow": 1.21, + "inflow": 0, + "volume": 0, + "temperature": 21.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 313.39, + "flow": 1.07, + "inflow": 0, + "volume": 0, + "temperature": 21.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 0, + "flow": 1.06, "inflow": 1.27, "volume": 2.9, - "temperature": 20.9, + "temperature": 20.4, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/SAPI.json b/public/data/SAPI.json index 4a7c083..d8b30f6 100644 --- a/public/data/SAPI.json +++ b/public/data/SAPI.json @@ -6826,8 +6826,17 @@ "level": 575.72, "flow": 0.02, "inflow": 0, + "volume": 0, + "temperature": 19, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 575.72, + "flow": 0.02, + "inflow": 0, "volume": 1.07, - "temperature": 17.8, + "temperature": 17.2, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/SCHU.json b/public/data/SCHU.json index 97a56d6..c47b083 100644 --- a/public/data/SCHU.json +++ b/public/data/SCHU.json @@ -6823,11 +6823,29 @@ }, { "timestamp": "2026-06-06T18:30:00.000Z", + "level": 534.62, + "flow": 0.06, + "inflow": 0, + "volume": 0, + "temperature": 20.1, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 534.62, + "flow": 0.06, + "inflow": 0, + "volume": 0, + "temperature": 20.1, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", "level": 0, "flow": 0.06, "inflow": 0.11, "volume": 0.09, - "temperature": 18.4, + "temperature": 17.6, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/SMSM.json b/public/data/SMSM.json index 973d522..d045053 100644 --- a/public/data/SMSM.json +++ b/public/data/SMSM.json @@ -6825,9 +6825,18 @@ "timestamp": "2026-06-06T18:30:00.000Z", "level": 260.09, "flow": 0.06, + "inflow": 0, + "volume": 0, + "temperature": 21.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 260.09, + "flow": 0.06, "inflow": 0.1, "volume": 0.41, - "temperature": 19.7, + "temperature": 19.1, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/SPKA.json b/public/data/SPKA.json index 5bd216d..84149bc 100644 --- a/public/data/SPKA.json +++ b/public/data/SPKA.json @@ -6817,8 +6817,26 @@ "level": 668.4, "flow": 0, "inflow": 0, + "volume": 0, + "temperature": 19.5, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 668.4, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 19.5, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 668.4, + "flow": 0, + "inflow": 0, "volume": 0.39, - "temperature": 18.5, + "temperature": 18, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/SPNE.json b/public/data/SPNE.json index 45c0cc9..e981734 100644 --- a/public/data/SPNE.json +++ b/public/data/SPNE.json @@ -6826,8 +6826,26 @@ "level": 385.01, "flow": 0.03, "inflow": 0, + "volume": 0, + "temperature": 19.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 385.01, + "flow": 0.03, + "inflow": 0, + "volume": 0, + "temperature": 19.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 385.01, + "flow": 0.03, + "inflow": 0, "volume": 0.84, - "temperature": 18.2, + "temperature": 17.4, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/SPZH.json b/public/data/SPZH.json index a5a98b9..fed2af9 100644 --- a/public/data/SPZH.json +++ b/public/data/SPZH.json @@ -6817,8 +6817,26 @@ "level": 678.61, "flow": 0, "inflow": 0, + "volume": 0, + "temperature": 17, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 678.61, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 17, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 678.61, + "flow": 0, + "inflow": 0, "volume": 0.16, - "temperature": 15.9, + "temperature": 15.2, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/STST.json b/public/data/STST.json index d19b6da..2f4aca5 100644 --- a/public/data/STST.json +++ b/public/data/STST.json @@ -6817,8 +6817,26 @@ "level": 588.42, "flow": 0.08, "inflow": 0, + "volume": 0, + "temperature": 19.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 588.42, + "flow": 0.08, + "inflow": 0, + "volume": 0, + "temperature": 19.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 588.42, + "flow": 0.08, + "inflow": 0, "volume": 0.33, - "temperature": 18.2, + "temperature": 17.5, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/STZL.json b/public/data/STZL.json index 5457f20..ac345a5 100644 --- a/public/data/STZL.json +++ b/public/data/STZL.json @@ -6825,9 +6825,18 @@ "timestamp": "2026-06-06T18:30:00.000Z", "level": 505.67, "flow": 0.22, + "inflow": 0, + "volume": 0, + "temperature": 19.6, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 505.67, + "flow": 0.22, "inflow": 0.1, "volume": 9.32, - "temperature": 18.4, + "temperature": 17.9, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/SVSV.json b/public/data/SVSV.json index 91795fb..2eeb9be 100644 --- a/public/data/SVSV.json +++ b/public/data/SVSV.json @@ -6823,11 +6823,20 @@ }, { "timestamp": "2026-06-06T18:30:00.000Z", - "level": 0, + "level": 580.54, + "flow": 0.05, + "inflow": 0, + "volume": 0, + "temperature": 18.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 580.54, "flow": 0.05, "inflow": 0, "volume": 0.41, - "temperature": 17.6, + "temperature": 17, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/TRTR.json b/public/data/TRTR.json index 0993e1e..b803848 100644 --- a/public/data/TRTR.json +++ b/public/data/TRTR.json @@ -6816,9 +6816,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 412.8, "flow": 0.34, + "inflow": 0, + "volume": 0, + "temperature": 20.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 412.8, + "flow": 0.33, + "inflow": 0, + "volume": 0, + "temperature": 20.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 412.8, + "flow": 0.34, + "inflow": 0, + "volume": 0, + "temperature": 20.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 412.8, + "flow": 0.34, "inflow": 0.46, "volume": 5.16, - "temperature": 18.7, + "temperature": 18, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/UHNY.json b/public/data/UHNY.json index 53aaad9..de558d2 100644 --- a/public/data/UHNY.json +++ b/public/data/UHNY.json @@ -6816,9 +6816,27 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 520.35, "flow": 0.72, + "inflow": 0, + "volume": 0, + "temperature": 17.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 520.35, + "flow": 0.72, + "inflow": 0, + "volume": 0, + "temperature": 17.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 520.35, + "flow": 0.71, "inflow": 0.68, "volume": 15.35, - "temperature": 16.5, + "temperature": 16.3, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLHN.json b/public/data/VLHN.json index 614ed2d..e1d7f85 100644 --- a/public/data/VLHN.json +++ b/public/data/VLHN.json @@ -7141,8 +7141,26 @@ "level": 369.81, "flow": 14.21, "inflow": 0, + "volume": 0, + "temperature": 20.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 369.81, + "flow": 14.21, + "inflow": 0, + "volume": 0, + "temperature": 20.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 369.82, + "flow": 14.21, + "inflow": 0, "volume": 20.32, - "temperature": 19.8, + "temperature": 19.1, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLKA.json b/public/data/VLKA.json index 221ba19..628527c 100644 --- a/public/data/VLKA.json +++ b/public/data/VLKA.json @@ -6816,9 +6816,27 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 282.99, "flow": 397.75, + "inflow": 0, + "volume": 0, + "temperature": 21.7, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 283.08, + "flow": 399.85, + "inflow": 0, + "volume": 0, + "temperature": 21.7, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 283.17, + "flow": 401, "inflow": 85.78, "volume": 10.12, - "temperature": 19.8, + "temperature": 18.9, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLKO.json b/public/data/VLKO.json index c1e5ff1..fb0cc94 100644 --- a/public/data/VLKO.json +++ b/public/data/VLKO.json @@ -7140,9 +7140,27 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 352.43, "flow": 19.05, + "inflow": 0, + "volume": 0, + "temperature": 20.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 352.43, + "flow": 19.05, + "inflow": 0, + "volume": 0, + "temperature": 20.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 352.43, + "flow": 19.05, "inflow": 13.43, "volume": 2.74, - "temperature": 19.8, + "temperature": 19.2, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLL1.json b/public/data/VLL1.json index 077d57d..e5f1692 100644 --- a/public/data/VLL1.json +++ b/public/data/VLL1.json @@ -7140,9 +7140,27 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 723.1, "flow": 45.19, + "inflow": 0, + "volume": 0, + "temperature": 19.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 723.1, + "flow": 38.81, + "inflow": 0, + "volume": 0, + "temperature": 19.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 723.1, + "flow": 38.84, "inflow": 9.25, "volume": 199.28, - "temperature": 17.9, + "temperature": 17.2, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLL2.json b/public/data/VLL2.json index f2ee75a..d0d22b8 100644 --- a/public/data/VLL2.json +++ b/public/data/VLL2.json @@ -7121,7 +7121,7 @@ { "timestamp": "2026-06-06T18:00:00.000Z", "level": 558.61, - "flow": 0, + "flow": 7.53, "inflow": 0, "volume": 0, "temperature": 19.8, @@ -7130,7 +7130,7 @@ { "timestamp": "2026-06-06T18:10:00.000Z", "level": 558.77, - "flow": 0, + "flow": 7.53, "inflow": 0, "volume": 0, "temperature": 19.8, @@ -7139,10 +7139,28 @@ { "timestamp": "2026-06-06T18:20:00.000Z", "level": 558.92, + "flow": 7.53, + "inflow": 0, + "volume": 0, + "temperature": 19.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 559.05, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 19.8, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 559.16, "flow": 0, "inflow": 5.37, "volume": 0.38, - "temperature": 18.1, + "temperature": 17.2, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLOR.json b/public/data/VLOR.json index abd7d97..2427a9b 100644 --- a/public/data/VLOR.json +++ b/public/data/VLOR.json @@ -7140,9 +7140,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 345.25, "flow": 459.43, + "inflow": 0, + "volume": 0, + "temperature": 21.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 345.25, + "flow": 460, + "inflow": 0, + "volume": 0, + "temperature": 21.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 345.24, + "flow": 458.76, + "inflow": 0, + "volume": 0, + "temperature": 21.2, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 345.23, + "flow": 0, "inflow": 24.39, "volume": 522.52, - "temperature": 20.6, + "temperature": 20.2, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLSL.json b/public/data/VLSL.json index c48149a..90f03bb 100644 --- a/public/data/VLSL.json +++ b/public/data/VLSL.json @@ -7140,9 +7140,36 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 269.86, "flow": 294.34, + "inflow": 0, + "volume": 0, + "temperature": 21.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 269.85, + "flow": 294.17, + "inflow": 0, + "volume": 0, + "temperature": 21.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 269.84, + "flow": 296.4, + "inflow": 0, + "volume": 0, + "temperature": 21.9, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 269.81, + "flow": 0, "inflow": 81.06, "volume": 260.87, - "temperature": 20.2, + "temperature": 19.5, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLST.json b/public/data/VLST.json index 81f78a2..18ad9be 100644 --- a/public/data/VLST.json +++ b/public/data/VLST.json @@ -7140,9 +7140,27 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 217.24, "flow": 150.52, + "inflow": 0, + "volume": 0, + "temperature": 21, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 217.36, + "flow": 150.46, + "inflow": 0, + "volume": 0, + "temperature": 21, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 217.36, + "flow": 150.31, "inflow": 48.25, "volume": 8.22, - "temperature": 19.5, + "temperature": 18.9, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/VLVE.json b/public/data/VLVE.json index d7dd423..9d0dfce 100644 --- a/public/data/VLVE.json +++ b/public/data/VLVE.json @@ -6816,9 +6816,27 @@ "timestamp": "2026-06-06T18:20:00.000Z", "level": 199.5, "flow": 39.53, + "inflow": 0, + "volume": 0, + "temperature": 22.1, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 199.48, + "flow": 39.56, + "inflow": 0, + "volume": 0, + "temperature": 22.1, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 199.48, + "flow": 39.54, "inflow": 45, "volume": 9.49, - "temperature": 20.1, + "temperature": 19.3, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/ZESV.json b/public/data/ZESV.json index 131bff3..bd14659 100644 --- a/public/data/ZESV.json +++ b/public/data/ZESV.json @@ -6815,10 +6815,37 @@ { "timestamp": "2026-06-06T18:20:00.000Z", "level": 375.15, + "flow": 0.44, + "inflow": 0, + "volume": 0, + "temperature": 21.1, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:30:00.000Z", + "level": 375.15, + "flow": 0.44, + "inflow": 0, + "volume": 0, + "temperature": 21.1, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:40:00.000Z", + "level": 375.15, + "flow": 0, + "inflow": 0, + "volume": 0, + "temperature": 21.1, + "precipitation": 0 + }, + { + "timestamp": "2026-06-06T18:50:00.000Z", + "level": 375.15, "flow": 0, "inflow": 1.87, "volume": 240.94, - "temperature": 20, + "temperature": 19.6, "precipitation": 0 } ] \ No newline at end of file diff --git a/public/data/lakes_index.json b/public/data/lakes_index.json index 6e7ac48..2510c24 100644 --- a/public/data/lakes_index.json +++ b/public/data/lakes_index.json @@ -8,15 +8,13 @@ "capacity": 65.1, "storageDiff": -1.8, "inflow": "9.3", - "outflow": "45.2", + "outflow": "38.8", "volume": 199.28, "maxVolume": 306, "navigationForbidden": false, "lat": 48.6322, "lng": 14.2215, "sparkline": [ - 723.09, - 723.09, 723.09, 723.09, 723.09, @@ -26,6 +24,8 @@ 723.08, 723.08, 723.1, + 723.1, + 723.1, 723.1 ] }, @@ -34,9 +34,9 @@ "name": "Lipno II", "river": "Vltava", "priority": true, - "level": "558.92", + "level": "559.16", "capacity": 23.8, - "storageDiff": -3.78, + "storageDiff": -3.54, "inflow": "5.4", "outflow": "0.0", "volume": 0.38, @@ -45,8 +45,6 @@ "lat": 48.625, "lng": 14.318, "sparkline": [ - 558.38, - 558.37, 558.33, 558.21, 558.19, @@ -56,7 +54,9 @@ 558.45, 558.61, 558.77, - 558.92 + 558.92, + 559.05, + 559.16 ] }, { @@ -64,9 +64,9 @@ "name": "Hněvkovice", "river": "Vltava", "priority": true, - "level": "369.81", + "level": "369.82", "capacity": 96.3, - "storageDiff": -0.29, + "storageDiff": -0.28, "inflow": "0.0", "outflow": "14.2", "volume": 20.32, @@ -75,8 +75,6 @@ "lat": 49.183, "lng": 14.444, "sparkline": [ - 369.83, - 369.83, 369.82, 369.82, 369.82, @@ -86,7 +84,9 @@ 369.81, 369.81, 369.81, - 369.81 + 369.81, + 369.81, + 369.82 ] }, { @@ -124,20 +124,17 @@ "name": "Orlík", "river": "Vltava", "priority": true, - "level": "345.25", + "level": "345.23", "capacity": 72.9, - "storageDiff": -4.65, + "storageDiff": -4.67, "inflow": "24.4", - "outflow": "459.4", + "outflow": "0.0", "volume": 522.52, "maxVolume": 716.5, "navigationForbidden": false, "lat": 49.606, "lng": 14.17, "sparkline": [ - 345.29, - 345.29, - 345.3, 345.3, 345.3, 345.29, @@ -146,7 +143,10 @@ 345.28, 345.28, 345.26, - 345.25 + 345.25, + 345.25, + 345.24, + 345.23 ] }, { @@ -154,20 +154,17 @@ "name": "Slapy", "river": "Vltava", "priority": true, - "level": "269.86", + "level": "269.81", "capacity": 96.9, - "storageDiff": -0.74, + "storageDiff": -0.79, "inflow": "81.1", - "outflow": "294.3", + "outflow": "0.0", "volume": 260.87, "maxVolume": 269.3, "navigationForbidden": false, "lat": 49.822, "lng": 14.436, "sparkline": [ - 269.88, - 269.89, - 269.89, 269.88, 269.88, 269.88, @@ -176,7 +173,10 @@ 269.88, 269.86, 269.85, - 269.86 + 269.86, + 269.85, + 269.84, + 269.81 ] }, { @@ -184,19 +184,17 @@ "name": "Štěchovice", "river": "Vltava", "priority": true, - "level": "217.24", + "level": "217.36", "capacity": 73.4, - "storageDiff": -2.16, + "storageDiff": -2.04, "inflow": "48.3", - "outflow": "150.5", + "outflow": "150.3", "volume": 8.22, "maxVolume": 11.2, "navigationForbidden": false, "lat": 49.845, "lng": 14.412, "sparkline": [ - 216.94, - 216.95, 216.93, 216.94, 216.93, @@ -206,7 +204,9 @@ 217.02, 217.04, 216.99, - 217.24 + 217.24, + 217.36, + 217.36 ] }, { @@ -214,9 +214,9 @@ "name": "Římov", "river": "Malše", "priority": true, - "level": "467.75", + "level": "467.76", "capacity": 78.5, - "storageDiff": -2.9, + "storageDiff": -2.89, "inflow": "2.2", "outflow": "0.0", "volume": 26.54, @@ -232,11 +232,11 @@ 467.75, 467.75, 467.75, - 467.75, + 467.76, 467.75, 467.75, 467.76, - 467.75 + 467.76 ] }, { @@ -248,16 +248,13 @@ "capacity": 56.9, "storageDiff": -1.27, "inflow": "1.5", - "outflow": "2.5", + "outflow": "0.0", "volume": 32.28, "maxVolume": 56.7, "navigationForbidden": false, "lat": 49.789, "lng": 13.155, "sparkline": [ - 352.84, - 352.84, - 352.84, 352.83, 352.83, 352.83, @@ -266,6 +263,9 @@ 352.84, 352.83, 352.83, + 352.83, + 352.84, + 352.84, 352.83 ] }, @@ -304,19 +304,17 @@ "name": "Kamýk", "river": "", "priority": false, - "level": "282.99", + "level": "283.17", "capacity": 79.1, - "storageDiff": -1.61, + "storageDiff": -1.43, "inflow": "85.8", - "outflow": "397.8", + "outflow": "401.0", "volume": 10.12, "maxVolume": 12.8, "navigationForbidden": false, "lat": 49.638, "lng": 14.258, "sparkline": [ - 282.96, - 282.97, 282.96, 282.97, 282.95, @@ -326,7 +324,9 @@ 283.12, 283.1, 282.97, - 282.99 + 282.99, + 283.08, + 283.17 ] }, { @@ -334,9 +334,9 @@ "name": "Vrané", "river": "", "priority": false, - "level": "199.50", + "level": "199.48", "capacity": 85.5, - "storageDiff": -0.6, + "storageDiff": -0.62, "inflow": "45.0", "outflow": "39.5", "volume": 9.49, @@ -345,8 +345,6 @@ "lat": 49.939, "lng": 14.391, "sparkline": [ - 199.65, - 199.57, 199.51, 199.48, 199.47, @@ -356,7 +354,9 @@ 199.45, 199.47, 199.48, - 199.5 + 199.5, + 199.48, + 199.48 ] }, { @@ -368,15 +368,15 @@ "capacity": 42.8, "storageDiff": -1.04, "inflow": "0.9", - "outflow": "0.7", + "outflow": "0.6", "volume": 2.44, "maxVolume": 5.7, "navigationForbidden": true, "lat": 49.027, "lng": 13.987, "sparkline": [ - 521.28, - 521.28, + 521.29, + 521.29, 521.29, 521.29, 521.29, @@ -424,9 +424,9 @@ "name": "Klíčava", "river": "", "priority": false, - "level": "292.90", + "level": "0.00", "capacity": 80.5, - "storageDiff": -0.8, + "storageDiff": 0, "inflow": "0.0", "outflow": "0.0", "volume": 7.49, @@ -446,7 +446,7 @@ 292.9, 292.9, 292.9, - 292.9 + 0 ] }, { @@ -465,9 +465,6 @@ "lat": 49.754, "lng": 13.564, "sparkline": [ - 345.03, - 345.03, - 345.02, 345.01, 345.01, 345.01, @@ -476,6 +473,9 @@ 345, 345, 345, + 345, + 345, + 345, 345 ] }, @@ -484,20 +484,17 @@ "name": "České Údolí", "river": "", "priority": false, - "level": "313.39", + "level": "0.00", "capacity": 52.7, - "storageDiff": -0.21, + "storageDiff": 0, "inflow": "1.3", - "outflow": "2.8", + "outflow": "1.1", "volume": 2.9, "maxVolume": 5.5, "navigationForbidden": false, "lat": 49.715, "lng": 13.364, "sparkline": [ - 313.41, - 313.41, - 313.4, 313.4, 313.39, 313.39, @@ -506,7 +503,10 @@ 0, 313.39, 313.39, - 313.39 + 313.39, + 313.39, + 313.39, + 0 ] }, { @@ -526,7 +526,7 @@ "lng": 15.195, "sparkline": [ 412.8, - 412.79, + 412.8, 412.8, 412.8, 412.8, @@ -555,8 +555,6 @@ "lat": 49.507, "lng": 15.263, "sparkline": [ - 447, - 447.01, 447.01, 447.01, 447.02, @@ -566,6 +564,8 @@ 447.02, 447.02, 447.02, + 447.02, + 447.02, 447.02 ] }, @@ -694,9 +694,9 @@ "name": "Obecnice", "river": "", "priority": false, - "level": "0.00", + "level": "563.67", "capacity": 76.7, - "storageDiff": 0, + "storageDiff": -0.88, "inflow": "0.0", "outflow": "0.0", "volume": 0.46, @@ -708,7 +708,6 @@ 563.67, 563.67, 563.67, - 563.67, 0, 0, 0, @@ -716,7 +715,8 @@ 563.67, 563.67, 563.67, - 0 + 563.67, + 563.67 ] }, { @@ -735,8 +735,6 @@ "lat": 49.791, "lng": 14.004, "sparkline": [ - 588.43, - 588.42, 588.42, 588.42, 588.42, @@ -746,6 +744,8 @@ 0, 588.42, 588.42, + 588.42, + 588.42, 588.42 ] }, @@ -784,9 +784,9 @@ "name": "Soběnov", "river": "", "priority": false, - "level": "581.35", + "level": "581.34", "capacity": 2.9, - "storageDiff": -0.86, + "storageDiff": -0.87, "inflow": "0.0", "outflow": "0.0", "volume": 0.04, @@ -795,9 +795,6 @@ "lat": 48.775, "lng": 14.536, "sparkline": [ - 581.45, - 581.51, - 581.58, 581.56, 581.52, 581.48, @@ -806,7 +803,10 @@ 581.39, 581.38, 581.37, - 581.35 + 581.35, + 581.35, + 581.35, + 581.34 ] }, { @@ -830,12 +830,12 @@ 534.61, 534.61, 534.61, - 534.61, - 534.61, 0, 534.62, 534.62, 534.62, + 534.62, + 534.62, 0 ] }, @@ -844,9 +844,9 @@ "name": "Staviště", "river": "", "priority": false, - "level": "0.00", + "level": "580.54", "capacity": 34.2, - "storageDiff": 0, + "storageDiff": -0.06, "inflow": "0.0", "outflow": "0.1", "volume": 0.41, @@ -861,12 +861,12 @@ 580.54, 580.54, 580.54, - 580.54, 0, 580.54, 580.54, 580.54, - 0 + 580.54, + 580.54 ] }, { diff --git a/scripts/watchData.ts b/scripts/watchData.ts index 7bac7a2..48a8567 100644 --- a/scripts/watchData.ts +++ b/scripts/watchData.ts @@ -2,11 +2,11 @@ import { execSync } from 'child_process'; // How many minutes after the 10-minute mark should we run the scraper? // The basin authority (PVL) generates data at HH:00, HH:10, HH:20... but it takes time to publish. -// 5 minutes (HH:05, HH:15...) is a safe buffer to avoid fetching outdated data. -const offsetMinutes = 5; +// 7 minutes (HH:07, HH:17...) is a safe buffer to avoid fetching outdated data. +const offsetMinutes = 7; console.log(`\n⏱️ HLADINATOR Watcher spuštěn!`); -console.log(`Budu automaticky stahovat nová data vždy v časech končících na ${offsetMinutes} (např. 10:05, 10:15, 10:25...).\nTo zajistí, že má Povodí dostatek času data vygenerovat a nahrát.\n`); +console.log(`Budu automaticky stahovat nová data vždy v časech končících na ${offsetMinutes} (např. 10:07, 10:17, 10:27...).\nTo zajistí, že má Povodí dostatek času data vygenerovat a nahrát.\n`); function runUpdate() { const now = new Date().toLocaleTimeString('cs-CZ'); diff --git a/src/App.css b/src/App.css index 98d74a9..203ee61 100644 --- a/src/App.css +++ b/src/App.css @@ -210,8 +210,13 @@ color: var(--text-muted); } -.kpi-trend.positive { color: var(--color-green); } -.kpi-trend.negative { color: var(--color-red); } +.kpi-trend.positive { + color: var(--color-green); +} + +.kpi-trend.negative { + color: var(--color-red); +} .chart-card { background-color: var(--bg-card); @@ -330,19 +335,19 @@ .mobile-only { display: flex !important; } - + .desktop-only { display: none !important; } - + .dashboard-container { flex-direction: column; } - + .sidebar { display: none; } - + .sidebar.mobile-open { display: flex; position: fixed; @@ -351,108 +356,107 @@ height: 100vh; z-index: 1000; } - + .main-content { padding: 1rem; gap: 1rem; } - + .topbar { flex-direction: column; align-items: flex-start; gap: 1rem; } - + .topbar-mobile-header { display: flex; width: 100%; align-items: center; justify-content: space-between; } - + .search-bar { width: 100%; } - + .search-bar input { display: none; } - + .search-bar { width: auto; background: transparent; border: none; padding: 0; } - + .search-bar svg { margin: 0; font-size: 1.5rem; color: var(--text-main); } - + .kpi-container { grid-template-columns: 1fr 1fr; gap: 1rem; } - + .kpi-card { padding: 1rem; } - + .kpi-value { font-size: 1.75rem; } - + .kpi-subtitle { flex-direction: column; align-items: flex-start; gap: 0.2rem; } - + .chart-card { padding: 1rem; } - + .chart-header { flex-direction: column; gap: 1rem; } - + .chart-title { font-size: 1.1rem; line-height: 1.3; } - + .chart-controls { width: 100%; flex-direction: column; gap: 1rem; } - + .control-group { width: 100%; } - + .button-group { width: 100%; justify-content: space-between; } - + .control-btn { padding: 0.5rem; flex: 1; text-align: center; } - + .chart-legend-container { flex-wrap: wrap; gap: 1rem !important; justify-content: flex-start !important; } - - .chart-legend-container > span { + + .chart-legend-container>span { flex: 0 0 calc(50% - 0.5rem); } -} - +} \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index de71ca4..20b28d5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,6 +4,7 @@ import LakeDetail from './components/LakeDetail'; import LakesOverview from './components/LakesOverview'; import LakeMap from './components/LakeMap'; import FavoritesOverview from './components/FavoritesOverview'; +import WeatherRadar from './components/WeatherRadar'; import Sidebar from './components/Sidebar'; import Topbar from './components/Topbar'; import SettingsModal from './components/SettingsModal'; @@ -79,9 +80,10 @@ function App() { setIsMobileMenuOpen(!isMobileMenuOpen)} />
- } /> - } /> + } /> + } /> } /> + } /> } />
diff --git a/src/components/FavoritesOverview.tsx b/src/components/FavoritesOverview.tsx index 81da453..6ca51d5 100644 --- a/src/components/FavoritesOverview.tsx +++ b/src/components/FavoritesOverview.tsx @@ -29,6 +29,7 @@ interface Lake { interface Props { language: Language; + windUnit?: 'kmh' | 'ms'; } const FavoritesOverview = ({ language }: Props) => { diff --git a/src/components/LakesOverview.tsx b/src/components/LakesOverview.tsx index e018a1f..218478d 100644 --- a/src/components/LakesOverview.tsx +++ b/src/components/LakesOverview.tsx @@ -28,6 +28,7 @@ interface Lake { interface Props { language: Language; + windUnit?: 'kmh' | 'ms'; } const LakeCard = ({ lake, language, isFav, onToggleFav }: { lake: Lake, language: Language, isFav: boolean, onToggleFav: (id: string) => void }) => { diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 61661ff..edfda3b 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { useNavigate, useLocation } from 'react-router-dom'; -import { FiDroplet, FiStar, FiMap, FiSettings, FiChevronLeft, FiChevronRight, FiDatabase } from 'react-icons/fi'; +import { FiDroplet, FiStar, FiMap, FiSettings, FiChevronLeft, FiChevronRight, FiDatabase, FiCloudRain } from 'react-icons/fi'; import { type Language, t } from '../translations'; import { useFavorites } from '../hooks/useFavorites'; @@ -21,6 +21,7 @@ const Sidebar = ({ language, onOpenSettings, isMobileMenuOpen, onCloseMobileMenu const isOverview = location.pathname === '/'; const isFavoritesPage = location.pathname === '/favorites'; const isMap = location.pathname === '/map'; + const isRadar = location.pathname === '/radar'; const handleNavigate = (path: string) => { navigate(path); @@ -29,17 +30,17 @@ const Sidebar = ({ language, onOpenSettings, isMobileMenuOpen, onCloseMobileMenu return (
-
- -
- HLADINATOR - v1.0 +
+ +
+ HLADINATOR + v1.0
- + {/* Toggle Button */} -
-
- +
{/* Favourites */}
handleNavigate('/favorites')} style={{ position: 'relative' }}> @@ -92,6 +93,12 @@ const Sidebar = ({ language, onOpenSettings, isMobileMenuOpen, onCloseMobileMenu {dict.map}
+ + {/* Radar */} +
handleNavigate('/radar')}> + + {dict.radar} +
diff --git a/src/components/Tooltip.tsx b/src/components/Tooltip.tsx index 37ed5bf..8da3b2e 100644 --- a/src/components/Tooltip.tsx +++ b/src/components/Tooltip.tsx @@ -8,6 +8,11 @@ interface Props { export const Tooltip = ({ content, children }: Props) => { const [show, setShow] = useState(false); const containerRef = useRef(null); + const tooltipRef = useRef(null); + const [positionStyle, setPositionStyle] = useState({ + left: '50%', + transform: 'translateX(-50%)', + }); useEffect(() => { const handleClickOutside = (e: MouseEvent) => { @@ -19,6 +24,45 @@ export const Tooltip = ({ content, children }: Props) => { return () => document.removeEventListener('mousedown', handleClickOutside); }, []); + useEffect(() => { + if (!show) { + setPositionStyle({ + left: '50%', + transform: 'translateX(-50%)', + }); + return; + } + + // Measure and adjust positioning to prevent overflow + const adjustPosition = () => { + if (tooltipRef.current) { + const rect = tooltipRef.current.getBoundingClientRect(); + const windowWidth = window.innerWidth; + const padding = 12; // safety margin from screen edges + + if (rect.right > windowWidth - padding) { + setPositionStyle({ + right: '0px', + left: 'auto', + transform: 'none', + }); + } else if (rect.left < padding) { + setPositionStyle({ + left: '0px', + transform: 'none', + }); + } + } + }; + + // Run adjustment immediately + adjustPosition(); + + // Also adjust on resize + window.addEventListener('resize', adjustPosition); + return () => window.removeEventListener('resize', adjustPosition); + }, [show]); + return (
{ > {children} {show && ( -
+
{content}
)} diff --git a/src/components/WeatherRadar.tsx b/src/components/WeatherRadar.tsx new file mode 100644 index 0000000..83e18c8 --- /dev/null +++ b/src/components/WeatherRadar.tsx @@ -0,0 +1,39 @@ +import { Helmet } from 'react-helmet-async'; +import { type Language, t } from '../translations'; + +interface Props { + language: Language; +} + +const WeatherRadar = ({ language }: Props) => { + return ( +
+ + {t[language].sidebar.radar} | Hladinátor + + +
+

+ {t[language].sidebar.radar} +

+

+ {language === 'cs' ? 'Aktuální srážkový radar a předpověď počasí pro celou ČR.' : 'Current precipitation radar and weather forecast for the Czech Republic.'} +

+
+ +
+ +
+
+ ); +}; + +export default WeatherRadar; diff --git a/src/translations.ts b/src/translations.ts index f87705f..e2d2050 100644 --- a/src/translations.ts +++ b/src/translations.ts @@ -6,6 +6,7 @@ export const t = { favorites: 'Favorites', lakes: 'Lakes & Reservoirs', map: 'Map', + radar: 'Weather Radar', settings: 'Settings' }, topbar: { @@ -78,6 +79,7 @@ export const t = { favorites: 'Oblíbené', lakes: 'Jezera a nádrže', map: 'Mapa', + radar: 'Meteoradar', settings: 'Nastavení' }, topbar: {