fix(tui): correct delete confirm labels, normalize help text

Delete confirmation dialog used wrong magic numbers for entity kind
mapping — maintenance windows showed as "alert", settings deletions
showed as "monitor". Now uses tab/section constants to match correctly.

Also: consistent [q/Esc] Back across all views, extract detailKeys(),
remove dead maxSections variable, add nodes empty state hint, use
models.Status constants in siteOrder, delete orphaned theme.png.
This commit is contained in:
2026-06-28 20:50:23 -04:00
parent 18e2d60210
commit 1d1a0ee67f
7 changed files with 20 additions and 21 deletions
+6 -4
View File
@@ -57,8 +57,7 @@ func (m Model) viewDetailTwoCol(site models.Site, hist monitor.SiteHistory, widt
b.WriteString(l + " " + divChar + " " + r + "\n")
}
keys := m.st.subtleStyle.Render("[h] History [s] SLA [e] Edit [esc] Close")
b.WriteString(" " + keys + "\n")
b.WriteString(" " + m.detailKeys() + "\n")
return lipgloss.NewStyle().Width(width).MaxWidth(width).Render(b.String())
}
@@ -293,12 +292,15 @@ func (m Model) viewDetailSingleCol(site models.Site, hist monitor.SiteHistory, w
b.WriteString(" " + m.st.subtleStyle.Render("30d") + " " + m.uptimeTimeline(m.detailDailyDays, timelineW) + "\n")
}
keys := m.st.subtleStyle.Render("[h] History [s] SLA [e] Edit [esc] Close")
b.WriteString(" " + keys + "\n")
b.WriteString(" " + m.detailKeys() + "\n")
return lipgloss.NewStyle().Width(width).MaxWidth(width).Render(b.String())
}
func (m Model) detailKeys() string {
return m.st.subtleStyle.Render("[h] History [s] SLA [e] Edit [q/Esc] Back")
}
func (m Model) fmtStatusWord(status string) string {
switch status {
case "DOWN":