renderVizStatus updates the Visualize tab status panel.
(w *text.Text, contacts int, load float64)
| 1269 | |
| 1270 | // renderVizStatus updates the Visualize tab status panel. |
| 1271 | func renderVizStatus(w *text.Text, contacts int, load float64) error { |
| 1272 | w.Reset() |
| 1273 | label := cell.FgColor(cell.ColorNumber(245)) |
| 1274 | value := cell.FgColor(cell.ColorNumber(252)) |
| 1275 | lines := []struct{ k, v string }{ |
| 1276 | {"Radar contacts: ", fmt.Sprintf("%d active", contacts)}, |
| 1277 | {"System load: ", fmt.Sprintf("%.0f%%", load)}, |
| 1278 | {"Threshold line: ", "0.75 (red dashed)"}, |
| 1279 | {"Heatmap palette:", "7-step thermal blue"}, |
| 1280 | {"Pie segments: ", "5 bands"}, |
| 1281 | {"Drag windows: ", "click & drag modal panels"}, |
| 1282 | } |
| 1283 | for i, ln := range lines { |
| 1284 | if err := w.Write(ln.k, text.WriteCellOpts(label)); err != nil { |
| 1285 | return err |
| 1286 | } |
| 1287 | nl := "\n" |
| 1288 | if i == len(lines)-1 { |
| 1289 | nl = "" |
| 1290 | } |
| 1291 | if err := w.Write(ln.v+nl, text.WriteCellOpts(value)); err != nil { |
| 1292 | return err |
| 1293 | } |
| 1294 | } |
| 1295 | return nil |
| 1296 | } |
| 1297 | |
| 1298 | // ───────────────────────────────────────────────────────────────────────────── |
| 1299 | // Tab 4 – Explorer (catalog · live previews · timeline scrubber) |
no test coverage detected