feat: add searchable Active Profile picker
This commit is contained in:
@@ -41,6 +41,11 @@ func (p terminalPresentation) mainView(model presentationState, width, height in
|
||||
operationProgress: model.operationProgress,
|
||||
},
|
||||
}
|
||||
if model.picker.open {
|
||||
page.dashboard = nil
|
||||
page.primary = model.picker.view(model.snapshot, width, max(5, height-9))
|
||||
page.footer = "↑/↓ PgUp/PgDn: select Enter: activate Esc: cancel"
|
||||
}
|
||||
if model.confirmation != nil {
|
||||
var details strings.Builder
|
||||
details.WriteString(p.theme.section.Render(model.confirmation.Title))
|
||||
@@ -66,7 +71,7 @@ func (p terminalPresentation) dashboardFooter(model presentationState, catalog t
|
||||
visibility = "u: hide unavailable"
|
||||
}
|
||||
if model.dashboardFocus == targetDetailsPane {
|
||||
footer := "↑/k ↓/j PgUp/PgDn: scroll Tab: focus Targets " + visibility + "\np: manage Proxy Profiles ?: help q: quit"
|
||||
footer := "↑/k ↓/j PgUp/PgDn: scroll Tab: focus Targets " + visibility + "\na: switch Active Profile p: manage Proxy Profiles ?: help q: quit"
|
||||
if model.operationActive {
|
||||
footer = "↑/k ↓/j PgUp/PgDn: scroll Tab: focus Targets ?: help\nMutations disabled: wait for the current mutation to finish"
|
||||
}
|
||||
@@ -80,7 +85,7 @@ func (p terminalPresentation) dashboardFooter(model presentationState, catalog t
|
||||
} else {
|
||||
actions = "Space: disabled (" + availability.compactReason + ") " + actions
|
||||
}
|
||||
footer := actions + "\np: manage Proxy Profiles r: refresh ?: help q: quit"
|
||||
footer := actions + "\na: switch Active Profile p: manage Proxy Profiles r: refresh ?: help q: quit"
|
||||
if model.operationActive {
|
||||
footer = actions + "\n?: help q: defer safe exit; new mutations disabled"
|
||||
}
|
||||
@@ -100,7 +105,7 @@ func (p terminalPresentation) helpView(model presentationState) terminalPage {
|
||||
return terminalPage{
|
||||
header: p.theme.title.Render("proxyctl Help — built-in Targets"),
|
||||
primary: strings.TrimRight(body.String(), "\n"),
|
||||
footer: "↑/k ↓/j: navigate Space: toggle p: manage Proxy Profiles\nr: refresh ?: help q/Escape: back",
|
||||
footer: "↑/k ↓/j: navigate Space: toggle a: switch Active Profile\np: manage Proxy Profiles r: refresh ?: help q/Escape: back",
|
||||
focusLine: 0,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user