feat(tui): upgrade alerts tab with lipgloss table, click zones, colored types

Alerts tab now matches sites/users quality: bordered table, click-to-select,
color-coded provider types, and improved config column display.
This commit is contained in:
2026-05-14 15:55:40 -04:00
parent 11848ce674
commit 2bf452d429
2 changed files with 112 additions and 21 deletions
+13
View File
@@ -268,6 +268,19 @@ func (m *Model) handleClick(msg tea.MouseMsg) (tea.Model, tea.Cmd) {
}
}
if m.currentTab == 1 {
end := m.tableOffset + m.maxTableRows
if end > len(m.alerts) {
end = len(m.alerts)
}
for i := m.tableOffset; i < end; i++ {
if m.zones.Get(fmt.Sprintf("alert-%d", i)).InBounds(msg) {
m.cursor = i
return m, nil
}
}
}
if m.currentTab == 3 {
end := m.tableOffset + m.maxTableRows
if end > len(m.users) {