fix: finish profile editor preview scrolling

This commit is contained in:
proxyctl coordinator
2026-07-18 00:07:57 +08:00
parent c56c206d8b
commit 27beb51a0e
6 changed files with 110 additions and 19 deletions
+10
View File
@@ -540,6 +540,16 @@ func newProfileDeleteConfirmation(selected profile.Profile, final, active bool)
}
func (m Model) updateForm(key tea.KeyMsg) (tea.Model, tea.Cmd) {
if m.form.currentField() == profile.BypassField {
switch key.String() {
case "pgup":
m.form.scrollBypassPreview(-5)
return m, nil
case "pgdown":
m.form.scrollBypassPreview(5)
return m, nil
}
}
switch key.Type {
case tea.KeyEsc:
m.page = profilesPage