refactor(tui): replace database ID column with row counter

Display sequential # instead of internal database IDs in sites, alerts,
and users tables for a cleaner view without gaps from deleted records.
This commit is contained in:
2026-05-14 20:57:03 -04:00
parent e97780ad38
commit cfcd71dabe
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ func (m Model) viewUsersTab() string {
for i := m.tableOffset; i < end; i++ {
u := m.users[i]
rows = append(rows, []string{
fmt.Sprintf("%d", u.ID),
fmt.Sprintf("%d", i+1),
m.zones.Mark(fmt.Sprintf("user-%d", i), limitStr(u.Username, 15)),
fmtRole(u.Role),
fmtKey(u.PublicKey),
@@ -80,7 +80,7 @@ func (m Model) viewUsersTab() string {
Border(lipgloss.RoundedBorder()).
BorderStyle(userBorderStyle).
Width(tableWidth).
Headers("ID", "USERNAME", "ROLE", "PUBLIC KEY").
Headers("#", "USERNAME", "ROLE", "PUBLIC KEY").
Rows(rows...).
StyleFunc(func(row, col int) lipgloss.Style {
if row == table.HeaderRow {