feat(tui): consolidate 6 tabs to 3, add log sidebar
Tab bar: Monitors | Maint | Settings (was 6 tabs). Settings tab merges Alerts, Nodes, Users as sub-sections with left/right arrow navigation. Each section keeps its own cursor, keybindings, and CRUD operations. Monitors tab now shows a log sidebar at >= 120 cols (70/30 split). Under 120 cols, monitors render full-width without logs. - Introduced tab constants (tabMonitors, tabMaint, tabSettings) - Introduced section constants (sectionAlerts, sectionNodes, sectionUsers) - Removed stateLogs and stateUsers states - All magic tab numbers replaced with named constants
This commit is contained in:
@@ -116,7 +116,7 @@ func (m *Model) submitUserForm() tea.Cmd {
|
||||
st := m.store
|
||||
id := m.editID
|
||||
username, key, role := d.Username, d.PublicKey, d.Role
|
||||
m.state = stateUsers
|
||||
m.state = stateDashboard
|
||||
if id > 0 {
|
||||
return writeCmd("Update user", func() error {
|
||||
return st.UpdateUser(context.Background(), id, username, key, role)
|
||||
|
||||
Reference in New Issue
Block a user