feat(tui): mouse click for settings sections, column sort, logs toggle
- Click Alerts/Nodes/Users sub-tabs in settings to switch sections - Click STATUS/NAME/LATENCY column headers to sort (click again to reverse direction) - Click logs panel to toggle focus (click again to unfocus)
This commit is contained in:
@@ -110,6 +110,11 @@ func (m Model) computeLayout() tableLayout {
|
||||
sortName: colName,
|
||||
sortLatency: colLatency,
|
||||
}
|
||||
sortableKeys := map[colKey]string{
|
||||
colStatus: "sort-status",
|
||||
colName: "sort-name",
|
||||
colLatency: "sort-latency",
|
||||
}
|
||||
if sortedKey, ok := sortColMap[m.sortColumn]; ok {
|
||||
arrow := "▼"
|
||||
if m.sortAsc {
|
||||
@@ -122,6 +127,11 @@ func (m Model) computeLayout() tableLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
for i, k := range active {
|
||||
if zoneID, ok := sortableKeys[k]; ok {
|
||||
headers[i] = m.zones.Mark(zoneID, headers[i])
|
||||
}
|
||||
}
|
||||
|
||||
numCols := len(headers)
|
||||
borderOverhead := 2 + (numCols - 1)
|
||||
|
||||
Reference in New Issue
Block a user