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 (detail inline, logs, SLA, history headers), extract detailKeys(), remove dead maxSections variable, add nodes empty state hint, use models.Status constants in siteOrder, delete orphaned theme.png.
This commit was merged in pull request #160.
This commit is contained in:
@@ -48,12 +48,15 @@ func (m Model) View() string {
|
||||
case stateConfirmDelete:
|
||||
kind := "monitor"
|
||||
switch m.deleteTab {
|
||||
case 1:
|
||||
kind = "alert"
|
||||
case 4:
|
||||
case tabMaint:
|
||||
kind = "maintenance window"
|
||||
case 5:
|
||||
kind = "user"
|
||||
case tabSettings:
|
||||
switch m.settingsSection {
|
||||
case sectionAlerts:
|
||||
kind = "alert"
|
||||
case sectionUsers:
|
||||
kind = "user"
|
||||
}
|
||||
}
|
||||
msg := m.st.dangerStyle.Render(fmt.Sprintf("Delete %s \"%s\"?", kind, m.deleteName))
|
||||
hint := m.st.subtleStyle.Render("[y] Confirm [n] Cancel")
|
||||
|
||||
Reference in New Issue
Block a user