feat: update water level datasets and improve Tooltip component responsiveness

This commit is contained in:
David Fencl
2026-06-08 21:30:34 +02:00
parent cdb653d660
commit 8fe39b7ab0
65 changed files with 1110 additions and 205 deletions
+18
View File
@@ -2407,5 +2407,23 @@
"volume": 0,
"temperature": 23.3,
"precipitation": 0
},
{
"timestamp": "2026-06-08T18:50:00.000Z",
"level": 96,
"flow": 8.741,
"inflow": 0,
"volume": 0,
"temperature": 22.8,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 96,
"flow": 8.49,
"inflow": 0,
"volume": 0,
"temperature": 22.8,
"precipitation": 0
}
]
+18
View File
@@ -2279,5 +2279,23 @@
"volume": 0,
"temperature": 21.8,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 91,
"flow": 5.07,
"temperature": 21.8,
"precipitation": 0,
"inflow": 0,
"volume": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 91,
"flow": 5.045,
"inflow": 0,
"volume": 0,
"temperature": 21.4,
"precipitation": 0
}
]
+18
View File
@@ -2360,5 +2360,23 @@
"volume": 0,
"temperature": 21.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T18:50:00.000Z",
"level": 149,
"flow": 6.037,
"inflow": 0,
"volume": 0,
"temperature": 20.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 149,
"flow": 6.016,
"inflow": 0,
"volume": 0,
"temperature": 20.6,
"precipitation": 0
}
]
+10 -1
View File
@@ -8276,7 +8276,16 @@
"flow": 0,
"inflow": 0,
"volume": 0,
"temperature": 21.7,
"temperature": 21.3,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:15:00.000Z",
"level": 463.42,
"flow": 0,
"inflow": 0,
"volume": 0,
"temperature": 21.3,
"precipitation": 0
}
]
+18
View File
@@ -9007,5 +9007,23 @@
"volume": 2.44,
"temperature": 18,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 521.28,
"flow": 0.65,
"inflow": 0.6,
"volume": 2.44,
"temperature": 17.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 521.28,
"flow": 0.65,
"inflow": 0.6,
"volume": 2.44,
"temperature": 17.6,
"precipitation": 0
}
]
+9
View File
@@ -8971,5 +8971,14 @@
"volume": 0.09,
"temperature": 20.2,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 416.72,
"flow": 0,
"inflow": 0,
"volume": 0.09,
"temperature": 19.9,
"precipitation": 0
}
]
+18
View File
@@ -8944,5 +8944,23 @@
"volume": 0.67,
"temperature": 20.2,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 448.8,
"flow": 0,
"inflow": 0,
"volume": 0.67,
"temperature": 19.8,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 448.8,
"flow": 0,
"inflow": 0,
"volume": 0.67,
"temperature": 19.8,
"precipitation": 0
}
]
+9
View File
@@ -8143,5 +8143,14 @@
"volume": 0.03,
"temperature": 19.4,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 580.85,
"flow": 0,
"inflow": 0,
"volume": 0.02,
"temperature": 18.9,
"precipitation": 0
}
]
+18
View File
@@ -9016,5 +9016,23 @@
"volume": 1.68,
"temperature": 18.8,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 447.1,
"flow": 0,
"inflow": 0.64,
"volume": 1.68,
"temperature": 18.2,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 447.1,
"flow": 0,
"inflow": 0.64,
"volume": 1.68,
"temperature": 18.2,
"precipitation": 0
}
]
+19 -1
View File
@@ -9044,10 +9044,28 @@
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 407.64,
"flow": 0,
"flow": 0.2,
"inflow": 0.4,
"volume": 0.14,
"temperature": 18.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 407.64,
"flow": 0,
"inflow": 0.4,
"volume": 0.14,
"temperature": 18.4,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 407.64,
"flow": 0,
"inflow": 0.4,
"volume": 0.14,
"temperature": 18.4,
"precipitation": 0
}
]
+18
View File
@@ -8998,5 +8998,23 @@
"volume": 7.48,
"temperature": 20.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 292.89,
"flow": 0.02,
"temperature": 20.5,
"precipitation": 0,
"inflow": -0.03,
"volume": 7.48
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 292.89,
"flow": 0,
"inflow": -0.03,
"volume": 7.48,
"temperature": 20.1,
"precipitation": 0
}
]
+9
View File
@@ -8269,5 +8269,14 @@
"volume": 0,
"temperature": 19,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 632.76,
"flow": 0,
"inflow": 0,
"volume": 0,
"temperature": 18.7,
"precipitation": 0
}
]
+9
View File
@@ -8269,5 +8269,14 @@
"volume": 0,
"temperature": 19.3,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 635.7,
"flow": 0,
"inflow": 0,
"volume": 0,
"temperature": 19,
"precipitation": 0
}
]
+18
View File
@@ -8998,5 +8998,23 @@
"volume": 0.67,
"temperature": 21.7,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 345.02,
"flow": 0.57,
"inflow": 0.59,
"volume": 0.67,
"temperature": 21.3,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 345.02,
"flow": 0.57,
"inflow": 0.59,
"volume": 0.67,
"temperature": 21.3,
"precipitation": 0
}
]
+19 -1
View File
@@ -9028,11 +9028,29 @@
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 0,
"level": 640.65,
"flow": 0.01,
"inflow": 0.01,
"volume": 0.73,
"temperature": 19.7,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 640.64,
"flow": 0.01,
"inflow": 0.01,
"volume": 0.73,
"temperature": 19.4,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 640.64,
"flow": 0,
"inflow": 0.01,
"volume": 0.73,
"temperature": 19.4,
"precipitation": 0
}
]
+18
View File
@@ -2335,5 +2335,23 @@
"volume": 0,
"temperature": 21.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 82,
"flow": 2.65,
"inflow": 0,
"volume": 0,
"temperature": 21,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 81,
"flow": 2.602,
"inflow": 0,
"volume": 0,
"temperature": 21,
"precipitation": 0
}
]
+10 -1
View File
@@ -2047,7 +2047,16 @@
"flow": 3.7,
"inflow": 0,
"volume": 0,
"temperature": 21,
"temperature": 20.3,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 50,
"flow": 3.7,
"inflow": 0,
"volume": 0,
"temperature": 20.3,
"precipitation": 0
}
]
+10 -1
View File
@@ -9335,10 +9335,19 @@
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 467.79,
"flow": 0,
"flow": 0.7,
"inflow": 1.6,
"volume": 26.61,
"temperature": 21.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 467.79,
"flow": 0.7,
"inflow": 1.6,
"volume": 26.61,
"temperature": 20.5,
"precipitation": 0
}
]
+19 -1
View File
@@ -9362,10 +9362,28 @@
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 352.78,
"flow": 0,
"flow": 2.52,
"inflow": 1.42,
"volume": 32.09,
"temperature": 22.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 352.78,
"flow": 2.52,
"inflow": 1.42,
"volume": 32.09,
"temperature": 21.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 352.77,
"flow": 0,
"inflow": 1.42,
"volume": 32.09,
"temperature": 21.6,
"precipitation": 0
}
]
+18
View File
@@ -9007,5 +9007,23 @@
"volume": 2.92,
"temperature": 19.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 530.65,
"flow": 0.49,
"inflow": 0.33,
"volume": 2.92,
"temperature": 18.8,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 530.65,
"flow": 0.49,
"inflow": 0.33,
"volume": 2.92,
"temperature": 18.8,
"precipitation": 0
}
]
+19 -1
View File
@@ -8830,11 +8830,29 @@
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 0,
"level": 563.66,
"flow": 0.02,
"inflow": 0,
"volume": 0.46,
"temperature": 20.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 563.66,
"flow": 0.02,
"inflow": 0,
"volume": 0.46,
"temperature": 19.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 0,
"flow": 0.02,
"inflow": 0,
"volume": 0.46,
"temperature": 19.9,
"precipitation": 0
}
]
+18
View File
@@ -2342,5 +2342,23 @@
"volume": 0,
"temperature": 21.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 45,
"flow": 5.288,
"inflow": 0,
"volume": 0,
"temperature": 21.4,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 44,
"flow": 5.074,
"inflow": 0,
"volume": 0,
"temperature": 21.4,
"precipitation": 0
}
]
+18
View File
@@ -2407,5 +2407,23 @@
"volume": 0,
"temperature": 19.2,
"precipitation": 0
},
{
"timestamp": "2026-06-08T18:50:00.000Z",
"level": 25,
"flow": 2.95,
"inflow": 0,
"volume": 0,
"temperature": 18.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 25,
"flow": 2.95,
"inflow": 0,
"volume": 0,
"temperature": 18.5,
"precipitation": 0
}
]
+1 -1
View File
@@ -8105,7 +8105,7 @@
"flow": 0,
"inflow": 0,
"volume": 0,
"temperature": 18.8,
"temperature": 18.4,
"precipitation": 0
}
]
+19 -1
View File
@@ -9001,11 +9001,29 @@
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 0,
"level": 313.43,
"flow": 1.03,
"inflow": 1.25,
"volume": 2.93,
"temperature": 22.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 313.43,
"flow": 1.04,
"inflow": 1.25,
"volume": 2.93,
"temperature": 21.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 0,
"flow": 1.03,
"inflow": 1.25,
"volume": 2.93,
"temperature": 21.5,
"precipitation": 0
}
]
+18
View File
@@ -2360,5 +2360,23 @@
"volume": 0,
"temperature": 19.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T18:50:00.000Z",
"level": 73,
"flow": 2.67,
"inflow": 0,
"volume": 0,
"temperature": 19.2,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 73,
"flow": 2.67,
"inflow": 0,
"volume": 0,
"temperature": 19.2,
"precipitation": 0
}
]
+18
View File
@@ -2317,5 +2317,23 @@
"volume": 0,
"temperature": 20,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 44,
"flow": 4.17,
"inflow": 0,
"volume": 0,
"temperature": 19.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 44,
"flow": 4.145,
"inflow": 0,
"volume": 0,
"temperature": 19.5,
"precipitation": 0
}
]
+9
View File
@@ -9007,5 +9007,14 @@
"volume": 1.06,
"temperature": 18.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 575.7,
"flow": 0.02,
"inflow": 0,
"volume": 1.06,
"temperature": 17.5,
"precipitation": 0
}
]
+18
View File
@@ -2360,5 +2360,23 @@
"volume": 0,
"temperature": 19.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T18:50:00.000Z",
"level": 25,
"flow": 1.46,
"inflow": 0,
"volume": 0,
"temperature": 18.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 25,
"flow": 1.46,
"inflow": 0,
"volume": 0,
"temperature": 18.9,
"precipitation": 0
}
]
+18
View File
@@ -2360,5 +2360,23 @@
"volume": 0,
"temperature": 20.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T18:50:00.000Z",
"level": 68,
"flow": 1.47,
"inflow": 0,
"volume": 0,
"temperature": 19.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 68,
"flow": 1.47,
"inflow": 0,
"volume": 0,
"temperature": 19.9,
"precipitation": 0
}
]
+19 -1
View File
@@ -9010,11 +9010,29 @@
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 0,
"level": 534.7,
"flow": 0.06,
"inflow": 0.07,
"volume": 0.1,
"temperature": 19.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 534.69,
"flow": 0.06,
"inflow": 0.07,
"volume": 0.1,
"temperature": 19.4,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 0,
"flow": 0.06,
"inflow": 0.07,
"volume": 0.1,
"temperature": 19.4,
"precipitation": 0
}
]
+27
View File
@@ -8980,5 +8980,32 @@
"volume": 0.41,
"temperature": 20.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 260.09,
"flow": 0.05,
"temperature": 20.9,
"precipitation": 0,
"inflow": 0.07,
"volume": 0.41
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 260.09,
"flow": 0.05,
"inflow": 0.07,
"volume": 0.41,
"temperature": 20.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 260.09,
"flow": 0.06,
"inflow": 0.07,
"volume": 0.41,
"temperature": 20.5,
"precipitation": 0
}
]
+18
View File
@@ -8998,5 +8998,23 @@
"volume": 0.39,
"temperature": 20.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 668.4,
"flow": 0,
"inflow": 0,
"volume": 0.39,
"temperature": 20.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 668.4,
"flow": 0,
"inflow": 0,
"volume": 0.39,
"temperature": 20.1,
"precipitation": 0
}
]
+18
View File
@@ -8719,5 +8719,23 @@
"volume": 0.84,
"temperature": 19.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 385.01,
"flow": 0.02,
"inflow": 0,
"volume": 0.84,
"temperature": 18.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 385.01,
"flow": 0.02,
"inflow": 0,
"volume": 0.84,
"temperature": 18.5,
"precipitation": 0
}
]
+18
View File
@@ -8989,5 +8989,23 @@
"volume": 0.16,
"temperature": 17.8,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 678.6,
"flow": 0,
"inflow": 0,
"volume": 0.16,
"temperature": 17.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 678.6,
"flow": 0,
"inflow": 0,
"volume": 0.16,
"temperature": 17.6,
"precipitation": 0
}
]
+19 -1
View File
@@ -9046,11 +9046,29 @@
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 588.39,
"flow": 0.08,
"inflow": 0,
"volume": 0.32,
"temperature": 19.3,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 588.39,
"flow": 0.08,
"temperature": 19.3,
"precipitation": 0,
"inflow": 0,
"volume": 0.32
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 0,
"flow": 0.08,
"inflow": 0,
"volume": 0.32,
"temperature": 19.6,
"temperature": 19.3,
"precipitation": 0
}
]
+18
View File
@@ -9007,5 +9007,23 @@
"volume": 9.28,
"temperature": 20,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 505.63,
"flow": 0.22,
"inflow": 0.05,
"volume": 9.28,
"temperature": 19.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 505.63,
"flow": 0.22,
"inflow": 0.05,
"volume": 9.28,
"temperature": 19.6,
"precipitation": 0
}
]
+11 -2
View File
@@ -8992,11 +8992,20 @@
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 0,
"level": 580.52,
"flow": 0.05,
"inflow": 0,
"volume": 0.41,
"temperature": 18.3,
"temperature": 17.7,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 580.52,
"flow": 0.05,
"inflow": 0,
"volume": 0.41,
"temperature": 17.7,
"precipitation": 0
}
]
+18
View File
@@ -9025,5 +9025,23 @@
"volume": 5.16,
"temperature": 19.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 412.8,
"flow": 0.34,
"inflow": 0.34,
"volume": 5.16,
"temperature": 19.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 412.8,
"flow": 0.34,
"inflow": 0.34,
"volume": 5.16,
"temperature": 19.1,
"precipitation": 0
}
]
+19 -1
View File
@@ -9020,10 +9020,28 @@
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 520.31,
"flow": 0,
"flow": 0.72,
"inflow": 0.53,
"volume": 15.31,
"temperature": 17.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 520.31,
"flow": 0.73,
"inflow": 0.53,
"volume": 15.31,
"temperature": 17.3,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 520.31,
"flow": 0,
"inflow": 0.53,
"volume": 15.31,
"temperature": 17.3,
"precipitation": 0
}
]
+10 -1
View File
@@ -2047,7 +2047,16 @@
"flow": 10.12,
"inflow": 0,
"volume": 0,
"temperature": 23,
"temperature": 22.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 104,
"flow": 8.47,
"inflow": 0,
"volume": 0,
"temperature": 22.5,
"precipitation": 0
}
]
+18
View File
@@ -2333,5 +2333,23 @@
"volume": 0,
"temperature": 24.2,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 45,
"flow": 51.71,
"inflow": 0,
"volume": 0,
"temperature": 23.8,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 45,
"flow": 51.98,
"inflow": 0,
"volume": 0,
"temperature": 23.8,
"precipitation": 0
}
]
+9
View File
@@ -9304,5 +9304,14 @@
"volume": 19.71,
"temperature": 21.5,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 369.59,
"flow": 15.27,
"inflow": 0,
"volume": 19.71,
"temperature": 20.9,
"precipitation": 0
}
]
+9
View File
@@ -9007,5 +9007,14 @@
"volume": 9.74,
"temperature": 20.8,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 282.9,
"flow": 299.48,
"inflow": 1.43,
"volume": 9.74,
"temperature": 20.2,
"precipitation": 0
}
]
+9
View File
@@ -9340,5 +9340,14 @@
"volume": 2.77,
"temperature": 21.2,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 352.51,
"flow": 19.11,
"inflow": 15.72,
"volume": 2.77,
"temperature": 20.7,
"precipitation": 0
}
]
+13 -2
View File
@@ -9321,10 +9321,21 @@
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 723.06,
"flow": 0,
"flow": 87.38,
"inflow": -2.61,
"volume": 198.39,
"temperature": 19.2,
"precipitation": 0
"precipitation": 0,
"qn": "> Q1"
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 723.06,
"flow": 85.6,
"inflow": -2.61,
"volume": 198.39,
"temperature": 18.9,
"precipitation": 0,
"qn": "> Q1"
}
]
+9
View File
@@ -9340,5 +9340,14 @@
"volume": 0.91,
"temperature": 18.7,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 560.86,
"flow": 0,
"inflow": 2.61,
"volume": 0.91,
"temperature": 18,
"precipitation": 0
}
]
+18
View File
@@ -9349,5 +9349,23 @@
"volume": 521.13,
"temperature": 22.3,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 345.19,
"flow": 146.21,
"inflow": 18.49,
"volume": 520.73,
"temperature": 21.7,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 345.19,
"flow": 0,
"inflow": 18.49,
"volume": 520.73,
"temperature": 21.7,
"precipitation": 0
}
]
+18
View File
@@ -9340,5 +9340,23 @@
"volume": 259.94,
"temperature": 20.2,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 269.76,
"flow": 244.12,
"inflow": 1.16,
"volume": 259.57,
"temperature": 19.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 269.82,
"flow": 0,
"inflow": 1.16,
"volume": 259.57,
"temperature": 19.6,
"precipitation": 0
}
]
+9
View File
@@ -9340,5 +9340,14 @@
"volume": 8.22,
"temperature": 19.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 217.57,
"flow": 159.38,
"inflow": 12.66,
"volume": 8.65,
"temperature": 19.5,
"precipitation": 0
}
]
+18
View File
@@ -2380,5 +2380,23 @@
"volume": 0,
"temperature": 19.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T18:50:00.000Z",
"level": 62,
"flow": 6.72,
"inflow": 0,
"volume": 0,
"temperature": 18.4,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 61,
"flow": 6.654,
"inflow": 0,
"volume": 0,
"temperature": 18.4,
"precipitation": 0
}
]
+9
View File
@@ -9043,5 +9043,14 @@
"volume": 9.13,
"temperature": 20.9,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 199.46,
"flow": 40.02,
"inflow": 25.05,
"volume": 9.36,
"temperature": 20.5,
"precipitation": 0
}
]
+27
View File
@@ -8980,5 +8980,32 @@
"volume": 240.58,
"temperature": 20.6,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:00:00.000Z",
"level": 375.12,
"flow": 0.44,
"temperature": 20.6,
"precipitation": 0,
"inflow": 0.58,
"volume": 240.58
},
{
"timestamp": "2026-06-08T19:10:00.000Z",
"level": 375.12,
"flow": 0,
"inflow": 0.58,
"volume": 240.58,
"temperature": 20.1,
"precipitation": 0
},
{
"timestamp": "2026-06-08T19:20:00.000Z",
"level": 375.12,
"flow": 0,
"inflow": 0.58,
"volume": 240.58,
"temperature": 20.1,
"precipitation": 0
}
]
+130 -130
View File
@@ -8,14 +8,13 @@
"capacity": 64.8,
"storageDiff": -1.84,
"inflow": "-2.6",
"outflow": "0.0",
"outflow": "85.6",
"volume": 198.39,
"maxVolume": 306,
"navigationForbidden": false,
"lat": 48.6322,
"lng": 14.2215,
"sparkline": [
723.06,
723.06,
723.06,
723.07,
@@ -26,6 +25,7 @@
723.06,
723.06,
723.06,
723.06,
723.06
],
"type": "lake"
@@ -35,9 +35,9 @@
"name": "Lipno II",
"river": "Vltava",
"priority": true,
"level": "560.72",
"level": "560.86",
"capacity": 56.9,
"storageDiff": -1.98,
"storageDiff": -1.84,
"inflow": "2.6",
"outflow": "0.0",
"volume": 0.91,
@@ -46,7 +46,6 @@
"lat": 48.625,
"lng": 14.318,
"sparkline": [
559.61,
559.6,
559.58,
559.63,
@@ -57,7 +56,8 @@
560.27,
560.41,
560.56,
560.72
560.72,
560.86
],
"type": "lake"
},
@@ -81,13 +81,13 @@
369.61,
369.61,
369.61,
369.61,
369.6,
369.6,
369.6,
369.59,
369.59,
369.59,
369.59,
369.59
],
"type": "lake"
@@ -111,7 +111,6 @@
352.52,
352.52,
352.52,
352.52,
352.53,
352.52,
352.52,
@@ -119,6 +118,7 @@
352.52,
352.52,
352.52,
352.51,
352.51
],
"type": "lake"
@@ -132,15 +132,13 @@
"capacity": 72.7,
"storageDiff": -4.71,
"inflow": "18.5",
"outflow": "146.4",
"volume": 521.13,
"outflow": "0.0",
"volume": 520.73,
"maxVolume": 716.5,
"navigationForbidden": false,
"lat": 49.606,
"lng": 14.17,
"sparkline": [
345.23,
345.22,
345.22,
345.22,
345.22,
@@ -150,6 +148,8 @@
345.21,
345.2,
345.2,
345.19,
345.19,
345.19
],
"type": "lake"
@@ -159,19 +159,17 @@
"name": "Slapy",
"river": "Vltava",
"priority": true,
"level": "269.75",
"capacity": 96.5,
"storageDiff": -0.85,
"level": "269.82",
"capacity": 96.4,
"storageDiff": -0.78,
"inflow": "1.2",
"outflow": "244.7",
"volume": 259.94,
"outflow": "0.0",
"volume": 259.57,
"maxVolume": 269.3,
"navigationForbidden": false,
"lat": 49.822,
"lng": 14.436,
"sparkline": [
269.81,
269.81,
269.81,
269.81,
269.79,
@@ -181,7 +179,9 @@
269.79,
269.77,
269.76,
269.75
269.75,
269.76,
269.82
],
"type": "lake"
},
@@ -190,18 +190,17 @@
"name": "Štěchovice",
"river": "Vltava",
"priority": true,
"level": "217.50",
"capacity": 73.4,
"storageDiff": -1.9,
"level": "217.57",
"capacity": 77.2,
"storageDiff": -1.83,
"inflow": "12.7",
"outflow": "159.3",
"volume": 8.22,
"outflow": "159.4",
"volume": 8.65,
"maxVolume": 11.2,
"navigationForbidden": false,
"lat": 49.845,
"lng": 14.412,
"sparkline": [
216.28,
216.51,
216.68,
216.71,
@@ -212,7 +211,8 @@
217.33,
217.38,
217.46,
217.5
217.5,
217.57
],
"type": "lake"
},
@@ -225,7 +225,7 @@
"capacity": 78.7,
"storageDiff": -2.86,
"inflow": "1.6",
"outflow": "0.0",
"outflow": "0.7",
"volume": 26.61,
"maxVolume": 33.8,
"navigationForbidden": true,
@@ -252,9 +252,9 @@
"name": "Hracholusky",
"river": "Mže",
"priority": true,
"level": "352.78",
"level": "352.77",
"capacity": 56.6,
"storageDiff": -1.32,
"storageDiff": -1.33,
"inflow": "1.4",
"outflow": "0.0",
"volume": 32.09,
@@ -263,8 +263,6 @@
"lat": 49.789,
"lng": 13.155,
"sparkline": [
352.79,
352.78,
352.79,
352.79,
352.79,
@@ -274,7 +272,9 @@
352.78,
352.78,
352.78,
352.78
352.78,
352.78,
352.77
],
"type": "lake"
},
@@ -314,18 +314,17 @@
"name": "Kamýk",
"river": "",
"priority": false,
"level": "282.89",
"level": "282.90",
"capacity": 76.1,
"storageDiff": -1.71,
"storageDiff": -1.7,
"inflow": "1.4",
"outflow": "299.3",
"outflow": "299.5",
"volume": 9.74,
"maxVolume": 12.8,
"navigationForbidden": false,
"lat": 49.638,
"lng": 14.258,
"sparkline": [
283.08,
283.07,
283.19,
283.27,
@@ -336,7 +335,8 @@
283.15,
283.11,
283.01,
282.89
282.89,
282.9
],
"type": "lake"
},
@@ -345,18 +345,17 @@
"name": "Vrané",
"river": "",
"priority": false,
"level": "199.41",
"capacity": 82.3,
"storageDiff": -0.69,
"level": "199.46",
"capacity": 84.3,
"storageDiff": -0.64,
"inflow": "25.1",
"outflow": "39.9",
"volume": 9.13,
"outflow": "40.0",
"volume": 9.36,
"maxVolume": 11.1,
"navigationForbidden": false,
"lat": 49.939,
"lng": 14.391,
"sparkline": [
199.28,
199.28,
199.29,
199.28,
@@ -367,7 +366,8 @@
199.34,
199.34,
199.37,
199.41
199.41,
199.46
],
"type": "lake"
},
@@ -380,7 +380,7 @@
"capacity": 42.8,
"storageDiff": -1.05,
"inflow": "0.6",
"outflow": "0.6",
"outflow": "0.7",
"volume": 2.44,
"maxVolume": 5.7,
"navigationForbidden": true,
@@ -424,11 +424,11 @@
520.32,
520.32,
520.32,
520.32,
520.32,
520.31,
520.32,
520.31,
520.31,
520.31,
520.31
],
"type": "lake"
@@ -511,8 +511,6 @@
"lat": 49.715,
"lng": 13.364,
"sparkline": [
313.43,
313.42,
313.43,
313.43,
0,
@@ -522,6 +520,8 @@
313.42,
313.42,
0,
313.43,
313.43,
0
],
"type": "lake"
@@ -566,7 +566,7 @@
"capacity": 88.4,
"storageDiff": -0.3,
"inflow": "0.6",
"outflow": "0.2",
"outflow": "0.0",
"volume": 1.68,
"maxVolume": 1.9,
"navigationForbidden": false,
@@ -575,8 +575,8 @@
"sparkline": [
447.09,
447.09,
447.09,
447.09,
447.1,
447.1,
447.1,
447.1,
447.1,
@@ -604,8 +604,6 @@
"lat": 49.805,
"lng": 12.639,
"sparkline": [
530.66,
530.66,
530.66,
530.66,
0,
@@ -615,6 +613,8 @@
530.65,
530.65,
530.66,
530.65,
530.65,
530.65
],
"type": "lake"
@@ -686,9 +686,9 @@
"name": "Láz",
"river": "",
"priority": false,
"level": "0.00",
"level": "640.64",
"capacity": 91.3,
"storageDiff": 0,
"storageDiff": -0.71,
"inflow": "0.0",
"outflow": "0.0",
"volume": 0.73,
@@ -705,10 +705,10 @@
640.65,
640.65,
640.65,
640.65,
640.64,
640.65,
640.64,
0
640.64
],
"type": "lake"
},
@@ -759,8 +759,6 @@
"lat": 49.791,
"lng": 14.004,
"sparkline": [
588.39,
588.39,
588.39,
588.39,
0,
@@ -770,6 +768,8 @@
588.39,
588.39,
0,
588.39,
588.39,
0
],
"type": "lake"
@@ -810,18 +810,17 @@
"name": "Soběnov",
"river": "",
"priority": false,
"level": "580.89",
"capacity": 2.1,
"storageDiff": -1.32,
"level": "580.85",
"capacity": 1.4,
"storageDiff": -1.36,
"inflow": "0.0",
"outflow": "0.0",
"volume": 0.03,
"volume": 0.02,
"maxVolume": 1.4,
"navigationForbidden": false,
"lat": 48.775,
"lng": 14.536,
"sparkline": [
581.06,
581.05,
581.04,
581.03,
@@ -832,7 +831,8 @@
580.92,
580.91,
580.9,
580.89
580.89,
580.85
],
"type": "lake"
},
@@ -852,8 +852,6 @@
"lat": 48.784,
"lng": 14.735,
"sparkline": [
534.69,
534.7,
534.7,
534.7,
0,
@@ -863,6 +861,8 @@
534.69,
534.7,
0,
534.7,
534.69,
0
],
"type": "lake"
@@ -872,9 +872,9 @@
"name": "Staviště",
"river": "",
"priority": false,
"level": "0.00",
"level": "580.52",
"capacity": 34.2,
"storageDiff": 0,
"storageDiff": -0.08,
"inflow": "0.0",
"outflow": "0.1",
"volume": 0.41,
@@ -892,9 +892,9 @@
580.52,
580.52,
580.52,
580.52,
0,
0
580.52,
580.52
],
"type": "lake"
},
@@ -976,8 +976,6 @@
"lat": 49.805,
"lng": 13.851,
"sparkline": [
448.8,
448.8,
448.81,
448.81,
448.8,
@@ -987,6 +985,8 @@
448.8,
448.8,
448.8,
448.8,
448.8,
448.8
],
"type": "lake"
@@ -996,9 +996,9 @@
"name": "Bílsko",
"river": "",
"priority": false,
"level": "463.41",
"capacity": 4.4,
"storageDiff": -0.62,
"level": "463.42",
"capacity": 4.6,
"storageDiff": -0.61,
"inflow": "0.0",
"outflow": "0.0",
"volume": 0,
@@ -1017,8 +1017,8 @@
463.42,
463.42,
463.42,
463.42,
463.41
463.41,
463.42
],
"type": "lake"
},
@@ -1213,19 +1213,17 @@
"name": "Praha - Malá Chuchle",
"river": "Vltava",
"priority": false,
"level": "46.00",
"level": "45.00",
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "54.2",
"outflow": "52.0",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
"lat": 50.0294,
"lng": 14.3986,
"sparkline": [
46,
49,
46,
45,
46,
@@ -1235,7 +1233,9 @@
45,
46,
46,
46
46,
45,
45
],
"type": "river"
},
@@ -1244,18 +1244,17 @@
"name": "České Budějovice",
"river": "Vltava",
"priority": false,
"level": "101.00",
"level": "104.00",
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "10.1",
"outflow": "8.5",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
"lat": 48.9712,
"lng": 14.4714,
"sparkline": [
101,
98,
101,
98,
@@ -1266,7 +1265,8 @@
108,
105,
102,
101
101,
104
],
"type": "river"
},
@@ -1275,11 +1275,11 @@
"name": "Beroun",
"river": "Berounka",
"priority": false,
"level": "97.00",
"level": "96.00",
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "8.9",
"outflow": "8.5",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
@@ -1287,17 +1287,17 @@
"lng": 14.0792,
"sparkline": [
96,
97,
97,
97,
97,
97,
97,
97,
97,
97,
96,
96,
97,
97,
97,
97,
97,
97,
97,
97,
97
96
],
"type": "river"
},
@@ -1310,7 +1310,7 @@
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "4.2",
"outflow": "4.1",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
@@ -1341,15 +1341,13 @@
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "5.0",
"outflow": "5.1",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
"lat": 49.3083,
"lng": 14.1436,
"sparkline": [
44,
43,
43,
43,
43,
@@ -1359,6 +1357,8 @@
46,
44,
44,
44,
45,
44
],
"type": "river"
@@ -1379,8 +1379,6 @@
"lat": 49.2319,
"lng": 13.5186,
"sparkline": [
25,
25,
25,
25,
26,
@@ -1390,6 +1388,8 @@
25,
26,
25,
25,
25,
25
],
"type": "river"
@@ -1399,19 +1399,17 @@
"name": "Bechyně",
"river": "Lužnice",
"priority": false,
"level": "84.00",
"level": "81.00",
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "3.1",
"outflow": "2.6",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
"lat": 49.2931,
"lng": 14.4758,
"sparkline": [
83,
81,
82,
84,
85,
@@ -1421,7 +1419,9 @@
82,
85,
87,
84
84,
82,
81
],
"type": "river"
},
@@ -1447,7 +1447,7 @@
51,
51,
51,
51,
50,
50,
50,
50,
@@ -1505,8 +1505,8 @@
"sparkline": [
26,
26,
26,
26,
25,
25,
25,
25,
25,
@@ -1537,8 +1537,8 @@
74,
74,
74,
74,
74,
73,
73,
73,
73,
73,
@@ -1558,7 +1558,7 @@
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "6.1",
"outflow": "6.0",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
@@ -1569,13 +1569,13 @@
151,
151,
151,
151,
151,
150,
150,
150,
149,
149,
149,
149,
149
],
"type": "river"
@@ -1585,19 +1585,17 @@
"name": "Plzeň - Bílá Hora",
"river": "Berounka",
"priority": false,
"level": "92.00",
"level": "91.00",
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "5.1",
"outflow": "5.0",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
"lat": 49.7731,
"lng": 13.3986,
"sparkline": [
88,
89,
89,
90,
90,
@@ -1607,7 +1605,9 @@
91,
92,
92,
92
92,
91,
91
],
"type": "river"
},
@@ -1616,11 +1616,11 @@
"name": "Vyšší Brod",
"river": "Vltava",
"priority": false,
"level": "62.00",
"level": "61.00",
"capacity": 0,
"storageDiff": 0,
"inflow": "0.0",
"outflow": "6.8",
"outflow": "6.7",
"volume": 0,
"maxVolume": 0,
"navigationForbidden": false,
@@ -1634,11 +1634,11 @@
65,
65,
65,
65,
65,
63,
62,
62
62,
62,
61
],
"type": "river"
}
+22
View File
@@ -6,6 +6,28 @@
background-color: var(--bg-dark);
}
.app-footer {
display: flex;
justifyContent: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
padding: 1.5rem;
font-size: 0.8rem;
color: var(--text-muted);
margin-top: auto;
}
@media (max-width: 768px) {
.app-footer {
justify-content: center;
flex-direction: column;
text-align: center;
gap: 0.75rem;
padding: 1rem;
}
}
.sidebar {
width: 190px;
background-color: var(--bg-card);
+1 -9
View File
@@ -89,15 +89,7 @@ function App() {
<Route path="/:slug" element={<LakeDetailWrapper language={language} windUnit={windUnit} />} />
</Routes>
</div>
<footer style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
padding: '1.5rem',
fontSize: '0.8rem',
color: 'var(--text-muted)',
marginTop: 'auto'
}}>
<footer className="app-footer">
<span>{t[language].chart.dataSources} pvl.cz, open-meteo.com</span>
<span>{t[language].chart.createdIn}</span>
</footer>
+4 -9
View File
@@ -1,4 +1,4 @@
import { useState, useEffect } from 'react';
import { useState } from 'react';
import { type Language, t } from '../translations';
import { TbSwimming, TbSailboat } from 'react-icons/tb';
@@ -8,14 +8,9 @@ interface Props {
}
export const DisclaimerModal = ({ language, setLanguage }: Props) => {
const [show, setShow] = useState(false);
useEffect(() => {
const isAccepted = localStorage.getItem('hladinator_disclaimer_accepted');
if (!isAccepted) {
setShow(true);
}
}, []);
const [show, setShow] = useState(() => {
return !localStorage.getItem('hladinator_disclaimer_accepted');
});
const handleAccept = () => {
localStorage.setItem('hladinator_disclaimer_accepted', 'true');
+46 -19
View File
@@ -25,13 +25,38 @@ interface LipnoData {
qn?: string;
}
interface LakeInfo {
id: string;
name: string;
river: string;
navigationForbidden?: boolean;
}
interface TooltipPayloadItem {
value: number;
dataKey: string;
name: string;
payload: Record<string, unknown>;
}
interface Props {
language: Language;
lakeId: string | null;
windUnit?: 'kmh' | 'ms';
}
const CustomTooltip = ({ active, payload, label, language, isWeather, isRiver, coordinate, viewBox }: any) => {
interface CustomTooltipProps {
active?: boolean;
payload?: TooltipPayloadItem[];
label?: string;
language: Language;
isWeather?: boolean;
isRiver?: boolean;
coordinate?: { x: number; y: number };
viewBox?: { width: number; height: number };
}
const CustomTooltip = ({ active, payload, label, language, isWeather, isRiver, coordinate, viewBox }: CustomTooltipProps) => {
if (active && payload && payload.length) {
const dict = t[language as Language].chart;
const isLeft = coordinate && viewBox && coordinate.x > viewBox.width / 2;
@@ -40,7 +65,7 @@ const CustomTooltip = ({ active, payload, label, language, isWeather, isRiver, c
return (
<div className={tooltipClass} style={{ backgroundColor: 'var(--bg-card)', padding: '0.4rem 0.6rem', border: '1px solid var(--border-color)', borderRadius: '0.5rem', boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1)', fontSize: '0.8rem' }}>
<p style={{ margin: '0 0 0.25rem 0', fontWeight: 'bold', color: 'var(--text-main)', fontSize: '0.85rem' }}>{label}</p>
{payload.map((entry: any, index: number) => {
{payload.map((entry: TooltipPayloadItem, index: number) => {
const isTemp = entry.name === 'temperature' || entry.dataKey === 'temperature';
return (
<p key={index} style={{ margin: 0, color: 'var(--text-main)' }}>
@@ -54,12 +79,12 @@ const CustomTooltip = ({ active, payload, label, language, isWeather, isRiver, c
return (
<div className={tooltipClass} style={{ backgroundColor: 'var(--bg-card)', padding: '0.4rem 0.6rem', border: '1px solid var(--border-color)', borderRadius: '0.5rem', boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1)', fontSize: '0.8rem' }}>
<p style={{ margin: '0 0 0.25rem 0', fontWeight: 'bold', color: 'var(--text-main)', fontSize: '0.85rem' }}>{label}</p>
{[...payload].sort((a: any, b: any) => {
{[...payload].sort((a: TooltipPayloadItem, b: TooltipPayloadItem) => {
const order = ['level', 'inflow', 'outflow', 'temperature', 'precipitation'];
const indexA = order.indexOf(a.dataKey);
const indexB = order.indexOf(b.dataKey);
return (indexA === -1 ? 99 : indexA) - (indexB === -1 ? 99 : indexB);
}).map((entry: any, index: number) => {
}).map((entry: TooltipPayloadItem, index: number) => {
let labelStr = '';
let unit = '';
let color = '';
@@ -116,9 +141,9 @@ const CustomTooltip = ({ active, payload, label, language, isWeather, isRiver, c
const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
const [data, setData] = useState<LipnoData[]>([]);
const [loading, setLoading] = useState(true);
const [lakeInfo, setLakeInfo] = useState<any>(null);
const [lakeInfo, setLakeInfo] = useState<LakeInfo | null>(null);
const [isSmoothed, setIsSmoothed] = useState(true);
const [timeRange, setTimeRange] = useState<'24h' | '7d' | '30d' | '1y' | 'all'>('7d');
const [timeRange, setTimeRange] = useState<'24h' | '7d' | '30d' | '1y' | 'all'>('24h');
const [visibleSeries, setVisibleSeries] = useState({
level: true,
outflow: true,
@@ -133,6 +158,7 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
const [rightCustomDomain, setRightCustomDomain] = useState<[number, number] | null>(null);
const [tooltipY, setTooltipY] = useState<number | undefined>(undefined);
const [weatherTooltipY, setWeatherTooltipY] = useState<number | undefined>(undefined);
const { isFavorite, toggleFavorite } = useFavorites();
useEffect(() => {
const handleResize = () => setIsMobile(window.innerWidth <= 768);
@@ -141,10 +167,12 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
return () => window.removeEventListener('resize', handleResize);
}, []);
useEffect(() => {
const [prevDeps, setPrevDeps] = useState({ timeRange, lakeId });
if (prevDeps.timeRange !== timeRange || prevDeps.lakeId !== lakeId) {
setPrevDeps({ timeRange, lakeId });
setLeftCustomDomain(null);
setRightCustomDomain(null);
}, [timeRange, lakeId]);
}
const dict = t[language].chart;
const topbarDict = t[language].topbar;
@@ -154,7 +182,7 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
fetch(`/data/lakes_index.json?t=${Date.now()}`)
.then(res => res.json())
.then(indexData => {
const found = indexData.find((l: any) => l.id === lakeId);
const found = indexData.find((l: LakeInfo) => l.id === lakeId);
setLakeInfo(found || { name: 'Lipno 1', river: 'Vltava' });
})
.catch(err => console.error(err));
@@ -166,7 +194,7 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
.then(res => res.json())
.then(json => {
let lastValidLevel: number | null = null;
const formattedData = json.map((item: any) => {
const formattedData = json.map((item: { timestamp: string, level?: number, flow?: number, inflow?: number, volume?: number, temperature?: number, precipitation?: number, qn?: string }) => {
const outflow = item.flow === null || isNaN(item.flow) ? 0 : item.flow;
let level = item.level === null || isNaN(item.level) ? 0 : item.level;
@@ -263,7 +291,6 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
const targetMs7d = nowMs - 7 * 24 * 60 * 60 * 1000;
const targetMs30d = nowMs - 30 * 24 * 60 * 60 * 1000;
const { isFavorite, toggleFavorite } = useFavorites();
const isFav = lakeId ? isFavorite(lakeId) : false;
let level24hAgo = latestData.level;
@@ -493,11 +520,11 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
</button>
<div style={{ display: 'flex', gap: '0.5rem', marginLeft: 'auto' }}>
<IconTooltip content={(lakeInfo as any).navigationForbidden ? (language === 'cs' ? 'Koupání zakázáno' : 'Swimming forbidden') : (language === 'cs' ? 'Koupání (bez omezení)' : 'Swimming allowed')}>
<TbSwimming size={24} color={(lakeInfo as any).navigationForbidden ? 'var(--color-red)' : 'var(--color-green)'} style={{ opacity: (lakeInfo as any).navigationForbidden ? 0.5 : 0.8 }} />
<IconTooltip content={lakeInfo.navigationForbidden ? (language === 'cs' ? 'Koupání zakázáno' : 'Swimming forbidden') : (language === 'cs' ? 'Koupání (bez omezení)' : 'Swimming allowed')}>
<TbSwimming size={24} color={lakeInfo.navigationForbidden ? 'var(--color-red)' : 'var(--color-green)'} style={{ opacity: lakeInfo.navigationForbidden ? 0.5 : 0.8 }} />
</IconTooltip>
<IconTooltip content={(lakeInfo as any).navigationForbidden ? (language === 'cs' ? 'Plavba zakázána' : 'Navigation forbidden') : (language === 'cs' ? 'Plavba (i bezmotorová) povolena' : 'Navigation allowed')}>
<TbSailboat size={24} color={(lakeInfo as any).navigationForbidden ? 'var(--color-red)' : 'var(--color-green)'} style={{ opacity: (lakeInfo as any).navigationForbidden ? 0.5 : 0.8 }} />
<IconTooltip content={lakeInfo.navigationForbidden ? (language === 'cs' ? 'Plavba zakázána' : 'Navigation forbidden') : (language === 'cs' ? 'Plavba (i bezmotorová) povolena' : 'Navigation allowed')}>
<TbSailboat size={24} color={lakeInfo.navigationForbidden ? 'var(--color-red)' : 'var(--color-green)'} style={{ opacity: lakeInfo.navigationForbidden ? 0.5 : 0.8 }} />
</IconTooltip>
</div>
</div>
@@ -616,7 +643,7 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
<ComposedChart
data={chartData}
margin={isMobile ? { top: 5, right: 5, left: 5, bottom: 0 } : { top: 5, right: 0, left: 10, bottom: 0 }}
onMouseMove={(state: any) => {
onMouseMove={(state: { chartY?: number } | null | undefined) => {
if (state && state.chartY !== undefined) {
const isBottomHalf = state.chartY > 150;
const targetY = isBottomHalf ? 5 : 180;
@@ -632,7 +659,7 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
</linearGradient>
</defs>
<XAxis dataKey="date" stroke="var(--text-muted)" tick={{fill: 'var(--text-muted)', fontSize: isMobile ? 10 : 12}} minTickGap={50} />
<YAxis yAxisId="left" domain={leftCustomDomain || (leftYAxisDomain as any)} stroke={visibleSeries.level ? "var(--text-muted)" : "transparent"} tick={{fill: visibleSeries.level ? 'var(--text-muted)' : 'transparent', fontSize: isMobile ? 10 : 12}} tickLine={visibleSeries.level ? { stroke: 'var(--text-muted)' } : { stroke: 'transparent' }} axisLine={visibleSeries.level ? { stroke: 'var(--text-muted)' } : { stroke: 'transparent' }} width={isMobile ? 42 : 60} tickFormatter={(v) => v.toFixed(isRiver ? 0 : 2)} />
<YAxis yAxisId="left" domain={leftCustomDomain || (leftYAxisDomain as [number, number] | ['auto', 'auto'])} stroke={visibleSeries.level ? "var(--text-muted)" : "transparent"} tick={{fill: visibleSeries.level ? 'var(--text-muted)' : 'transparent', fontSize: isMobile ? 10 : 12}} tickLine={visibleSeries.level ? { stroke: 'var(--text-muted)' } : { stroke: 'transparent' }} axisLine={visibleSeries.level ? { stroke: 'var(--text-muted)' } : { stroke: 'transparent' }} width={isMobile ? 42 : 60} tickFormatter={(v) => v.toFixed(isRiver ? 0 : 2)} />
<YAxis yAxisId="right" orientation="right" domain={rightCustomDomain || [0, (dataMax: number) => Math.max(dataMax, 1)]} stroke={(visibleSeries.outflow || visibleSeries.inflow) ? "var(--text-muted)" : "transparent"} tick={{fill: (visibleSeries.outflow || visibleSeries.inflow) ? 'var(--text-muted)' : 'transparent', fontSize: isMobile ? 10 : 12}} tickLine={(visibleSeries.outflow || visibleSeries.inflow) ? { stroke: 'var(--text-muted)' } : { stroke: 'transparent' }} axisLine={(visibleSeries.outflow || visibleSeries.inflow) ? { stroke: 'var(--text-muted)' } : { stroke: 'transparent' }} width={isMobile ? 35 : 60} tickFormatter={(v) => v.toFixed(1)} />
<CartesianGrid strokeDasharray="3 3" stroke="rgba(255,255,255,0.05)" vertical={false} />
@@ -773,7 +800,7 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
<ComposedChart
data={chartData}
margin={isMobile ? { top: 5, right: 5, left: 5, bottom: 0 } : { top: 5, right: 0, left: 10, bottom: 0 }}
onMouseMove={(state: any) => {
onMouseMove={(state: { chartY?: number } | null | undefined) => {
if (state && state.chartY !== undefined) {
const isBottomHalf = state.chartY > 100;
const targetY = isBottomHalf ? 5 : 110;
@@ -793,7 +820,7 @@ const LakeDetail = ({ language, lakeId, windUnit = 'kmh' }: Props) => {
/>
<Bar yAxisId="precip" dataKey="precipitation" fill="var(--color-cyan)" fillOpacity={0.6} isAnimationActive={animate} hide={!visibleWeatherSeries.precip} />
<Line yAxisId="temp" type={curveType} dataKey="temperature" stroke="var(--color-red)" strokeWidth={2} dot={true} isAnimationActive={animate} hide={!visibleWeatherSeries.temp} />
<Line yAxisId="temp" type="basis" dataKey="temperature" stroke="var(--color-red)" strokeWidth={3} dot={false} isAnimationActive={animate} hide={!visibleWeatherSeries.temp} />
</ComposedChart>
</ResponsiveContainer>
</div>
+24 -3
View File
@@ -1,4 +1,4 @@
import { useState, useEffect } from 'react';
import { useState, useEffect, useMemo } from 'react';
import { MapContainer, TileLayer, Marker, Popup, Tooltip } from 'react-leaflet';
import L from 'leaflet';
import 'leaflet/dist/leaflet.css';
@@ -71,6 +71,27 @@ const LakeMap = ({ language }: Props) => {
.catch(err => console.error('Error fetching map lakes:', err));
}, []);
const randomStats = useMemo(() => {
const stats: Record<string, { area: string; depth: string }> = {};
const simpleHash = (str: string) => {
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash = (hash << 5) - hash + str.charCodeAt(i);
hash = hash & hash;
}
return Math.abs(hash);
};
lakes.forEach(l => {
const hash = simpleHash(l.id);
stats[l.id] = {
area: (((hash % 500) / 10) + 10).toFixed(1),
depth: (((hash % 300) / 10) + 5).toFixed(1)
};
});
return stats;
}, [lakes]);
const filteredLakes = lakes.filter(lake =>
lake.name.toLowerCase().includes(searchTerm.toLowerCase())
);
@@ -148,11 +169,11 @@ const LakeMap = ({ language }: Props) => {
<div className="map-lake-stats">
<div>
<span style={{ color: 'var(--text-muted)', display: 'block' }}>{language === 'cs' ? 'Rozloha' : 'Area'}</span>
<span style={{ color: 'var(--text-main)' }}>{(Math.random() * 50 + 10).toFixed(1)} km²</span>
<span style={{ color: 'var(--text-main)' }}>{randomStats[lake.id]?.area || '0.0'} km²</span>
</div>
<div>
<span style={{ color: 'var(--text-muted)', display: 'block' }}>{language === 'cs' ? 'Hloubka' : 'Depth'}</span>
<span style={{ color: 'var(--text-main)' }}>{(Math.random() * 30 + 5).toFixed(1)}m</span>
<span style={{ color: 'var(--text-main)' }}>{randomStats[lake.id]?.depth || '0.0'}m</span>
</div>
</div>
</div>
+1 -1
View File
@@ -167,7 +167,7 @@ export const RiversOverview = ({ language }: Props) => {
.then(res => res.json())
.then(data => {
// Filter only rivers
const filtered = data.filter((item: any) => item.type === 'river');
const filtered = data.filter((item: Partial<River>) => item.type === 'river');
setRivers(filtered);
})
.catch(err => console.error(err));
+7 -5
View File
@@ -26,10 +26,6 @@ export const Tooltip = ({ content, children }: Props) => {
useEffect(() => {
if (!show) {
setPositionStyle({
left: '50%',
transform: 'translateX(-50%)',
});
return;
}
@@ -67,10 +63,16 @@ export const Tooltip = ({ content, children }: Props) => {
<div
ref={containerRef}
style={{ position: 'relative', display: 'inline-flex' }}
onMouseEnter={() => setShow(true)}
onMouseEnter={() => {
setPositionStyle({ left: '50%', transform: 'translateX(-50%)' });
setShow(true);
}}
onMouseLeave={() => setShow(false)}
onClick={(e) => {
e.stopPropagation();
if (!show) {
setPositionStyle({ left: '50%', transform: 'translateX(-50%)' });
}
setShow(!show);
}}
>
+13 -3
View File
@@ -73,7 +73,7 @@ export const WeatherWidget = ({ lat, lng, language, sensorTemp, windUnit = 'kmh'
// Refresh weather every 15 minutes
const interval = setInterval(fetchWeather, 15 * 60 * 1000);
return () => clearInterval(interval);
}, [lat, lng]);
}, [lat, lng, windUnit]);
const dict = {
cs: { title: 'Počasí a Vítr (Aktuálně)', error: 'Data nedostupná', wind: 'Vítr', gusts: 'Nárazy', temp: 'Teplota' },
@@ -113,8 +113,18 @@ export const WeatherWidget = ({ lat, lng, language, sensorTemp, windUnit = 'kmh'
</div>
<div style={{ display: 'flex', flexDirection: 'column' }}>
<div style={{ fontSize: '1.5rem', fontWeight: 'bold', lineHeight: 1.1, color: 'var(--text-main)', whiteSpace: 'nowrap' }}>
{data.windSpeed.toFixed(1)} <span style={{ fontSize: '0.8rem', color: 'var(--text-muted)', fontWeight: 'normal' }}>{windUnit === 'kmh' ? 'km/h' : 'm/s'} {getCompassDirection(data.windDir, language)}</span>
<div style={{ fontSize: '1.5rem', fontWeight: 'bold', lineHeight: 1.1, color: 'var(--text-main)', whiteSpace: 'nowrap', display: 'flex', alignItems: 'center', gap: '4px' }}>
{data.windSpeed.toFixed(1)}
<span style={{ fontSize: '0.8rem', color: 'var(--text-muted)', fontWeight: 'normal' }}>
{windUnit === 'kmh' ? 'km/h' : 'm/s'} {getCompassDirection(data.windDir, language)}
</span>
<svg
width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
style={{ color: 'var(--text-muted)', transform: `rotate(${data.windDir}deg)`, transition: 'transform 0.3s ease' }}
>
<line x1="12" y1="19" x2="12" y2="5"></line>
<polyline points="5 12 12 5 19 12"></polyline>
</svg>
</div>
<div style={{ fontSize: '0.8rem', color: 'var(--text-muted)', marginTop: '4px', whiteSpace: 'nowrap' }}>
{dict.gusts}: <span style={{ color: data.windGusts > (windUnit === 'kmh' ? 50 : 13.8) ? 'var(--color-red)' : 'var(--text-main)' }}>{data.windGusts.toFixed(1)} {windUnit === 'kmh' ? 'km/h' : 'm/s'}</span>
+40 -8
View File
@@ -27,7 +27,17 @@ const getCompassDirection = (degrees: number, language: 'cs' | 'en') => {
return directions[index];
};
const CustomWindTooltip = ({ active, payload, label, language, windUnit = 'kmh', coordinate, viewBox }: any) => {
interface CustomWindTooltipProps {
active?: boolean;
payload?: { payload: WindDataPoint, value: number, name: string }[];
label?: string;
language: 'cs' | 'en';
windUnit?: 'kmh' | 'ms';
coordinate?: { x: number; y: number };
viewBox?: { width: number; height: number };
}
const CustomWindTooltip = ({ active, payload, label, language, windUnit = 'kmh', coordinate, viewBox }: CustomWindTooltipProps) => {
if (active && payload && payload.length) {
const isLeft = coordinate && viewBox && coordinate.x > viewBox.width / 2;
const tooltipClass = `chart-tooltip ${isLeft ? 'tooltip-left' : 'tooltip-right'}`;
@@ -52,7 +62,16 @@ const CustomWindTooltip = ({ active, payload, label, language, windUnit = 'kmh',
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: '6px', marginTop: '2px', color: 'var(--text-muted)' }}>
<FiWind />
<span>{language === 'cs' ? 'Směr' : 'Direction'}: <strong>{data.dirStr} ({data.dir}°)</strong></span>
<span style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
{language === 'cs' ? 'Směr' : 'Direction'}: <strong>{data.dirStr} ({data.dir}°)</strong>
<svg
width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
style={{ transform: `rotate(${data.dir}deg)` }}
>
<line x1="12" y1="19" x2="12" y2="5"></line>
<polyline points="5 12 12 5 19 12"></polyline>
</svg>
</span>
</div>
</div>
</div>
@@ -61,7 +80,7 @@ const CustomWindTooltip = ({ active, payload, label, language, windUnit = 'kmh',
return null;
};
const CustomWindDot = (props: any) => {
const CustomWindDot = (props: { cx?: number; cy?: number; payload?: WindDataPoint }) => {
const { cx, cy, payload } = props;
if (!cx || !cy || payload.dir === undefined) return null;
@@ -78,10 +97,11 @@ const CustomWindDot = (props: any) => {
);
};
export const WindChart = ({ lat, lng, language, timeRange = '7d', windUnit = 'kmh' }: WindChartProps) => {
export const WindChart = ({ lat, lng, language, timeRange = '24h', windUnit = 'kmh' }: WindChartProps) => {
const [data, setData] = useState<WindDataPoint[]>([]);
const [loading, setLoading] = useState(true);
const [currentSpeed, setCurrentSpeed] = useState(0);
const [currentDir, setCurrentDir] = useState(0);
const [maxGust, setMaxGust] = useState(0);
const [isMobile, setIsMobile] = useState(false);
const [tooltipY, setTooltipY] = useState<number | undefined>(undefined);
@@ -169,6 +189,7 @@ export const WindChart = ({ lat, lng, language, timeRange = '7d', windUnit = 'km
setData(downsampled);
setMaxGust(maxG);
setCurrentSpeed(speeds[closestIdx] || speeds[speeds.length - 1] || 0);
setCurrentDir(dirs[closestIdx] || dirs[dirs.length - 1] || 0);
} catch (err) {
console.error(err);
@@ -180,7 +201,7 @@ export const WindChart = ({ lat, lng, language, timeRange = '7d', windUnit = 'km
if (lat && lng) {
fetchWind();
}
}, [lat, lng, language, timeRange]);
}, [lat, lng, language, timeRange, windUnit]);
if (loading) {
return (
@@ -209,9 +230,16 @@ export const WindChart = ({ lat, lng, language, timeRange = '7d', windUnit = 'km
}}>
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
<span style={{ fontSize: '0.8rem', color: 'var(--text-muted)' }}>{language === 'cs' ? 'Aktuální rychlost' : 'Current Speed'}</span>
<div style={{ display: 'flex', alignItems: 'baseline', gap: '0.25rem' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.25rem' }}>
<span style={{ fontSize: '1.5rem', fontWeight: 'bold', color: 'var(--text-main)' }}>{currentSpeed.toFixed(1)}</span>
<span style={{ fontSize: '0.9rem', color: 'var(--color-cyan)' }}>{windUnit === 'kmh' ? 'km/h' : 'm/s'}</span>
<svg
width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"
style={{ color: 'var(--color-cyan)', marginLeft: '2px', transform: `rotate(${currentDir}deg)`, transition: 'transform 0.3s ease' }}
>
<line x1="12" y1="19" x2="12" y2="5"></line>
<polyline points="5 12 12 5 19 12"></polyline>
</svg>
</div>
</div>
@@ -230,7 +258,7 @@ export const WindChart = ({ lat, lng, language, timeRange = '7d', windUnit = 'km
<ComposedChart
data={data}
margin={isMobile ? { top: 5, right: 5, left: 5, bottom: 0 } : { top: 5, right: 0, left: -20, bottom: 0 }}
onMouseMove={(state: any) => {
onMouseMove={(state: { chartY?: number } | null | undefined) => {
if (state && state.chartY !== undefined) {
const isBottomHalf = state.chartY > 140;
const targetY = isBottomHalf ? 5 : 160;
@@ -275,7 +303,11 @@ export const WindChart = ({ lat, lng, language, timeRange = '7d', windUnit = 'km
fillOpacity={1}
fill="url(#colorWind)"
isAnimationActive={true}
dot={<CustomWindDot />}
dot={(props: any) => {
const step = Math.max(1, Math.floor(data.length / (isMobile ? 15 : 30)));
if (props.index % step !== 0 && props.index !== data.length - 1) return null;
return <CustomWindDot key={props.index} {...props} />;
}}
activeDot={{ r: 6, fill: 'var(--color-cyan)', stroke: '#1e293b', strokeWidth: 2 }}
/>
<Line
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable react-refresh/only-export-components */
import { createContext, useContext, useState, useCallback, type ReactNode } from 'react';
const STORAGE_KEY = 'hladinator_favorites';
+1 -1
View File
@@ -5,7 +5,7 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
// @ts-ignore
// @ts-expect-error vite-test type mismatch
test: {
globals: true,
environment: 'jsdom',