A10-A16: datetime-local time parsing, step heading, gps_error state, unified leaflet 1.9.4 icons, drop debug log, dashboard error surfacing, isMobile on resize

This commit is contained in:
root
2026-07-25 12:02:56 +00:00
parent 0b033c402d
commit 5a631f6553
6 changed files with 28 additions and 15 deletions
@@ -41,7 +41,10 @@ const AnalysisResult = () => {
const getTimeOfDay = (lostTime) => {
if (!lostTime) return 'день';
const hour = parseInt(lostTime.split(':')[0]);
// Значение может прийти как "YYYY-MM-DDTHH:MM" (input type="datetime-local")
// или как "HH:MM" — берём часы из обоих форматов.
const timePart = lostTime.includes('T') ? lostTime.split('T')[1] : lostTime;
const hour = parseInt(timePart.split(':')[0]);
if (hour >= 6 && hour < 18) return 'день';
if (hour >= 18 && hour < 22) return 'сумерки';
return 'ночь';