diff --git a/cmd/server/main.go b/cmd/server/main.go index 2af661c..2b040b3 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -42,6 +42,8 @@ func (a *API) HandleHealth(w http.ResponseWriter, r *http.Request) { status = "Нет связи" } + now := time.Now() + writeJSON(w, map[string]any{ "status": status, "uptime_sec": time.Since(a.startTime).Seconds(), @@ -50,6 +52,7 @@ func (a *API) HandleHealth(w http.ResponseWriter, r *http.Request) { "has_data": ok, "latest": latest, "stats": a.buf.Stats(), + "server_time": now.Format("02.01.2006 15:04"), }) } diff --git a/cmd/server/web/css/style.css b/cmd/server/web/css/style.css index 50d7fb0..c75c9f7 100644 --- a/cmd/server/web/css/style.css +++ b/cmd/server/web/css/style.css @@ -12,9 +12,9 @@ body { /* ===== HEADER BAR ===== */ .header-bar { - display: flex; + display: grid; + grid-template-columns: 1fr auto 1fr; align-items: center; - justify-content: space-between; margin-bottom: 15px; gap: 16px; } @@ -22,7 +22,20 @@ body { h1 { font-size: 22px; margin: 0; - flex: 1; +} + +.header-time { + font-size: 16px; + text-align: center; + white-space: nowrap; + padding: 6px 12px; + border: 1px solid rgba(0, 255, 136, 0.35); + border-radius: 8px; + background: rgba(0, 255, 136, 0.05); +} + +.header-bar .cam-btn { + justify-self: end; } /* ===== CAMERA BUTTON (теперь в header) ===== */ diff --git a/cmd/server/web/dashboard.html b/cmd/server/web/dashboard.html index aa6683c..67780b7 100644 --- a/cmd/server/web/dashboard.html +++ b/cmd/server/web/dashboard.html @@ -13,6 +13,7 @@

GPIO МОНИТОРИНГ В РЕАЛЬНОМ ВРЕМЕНИ

+
--:--:--