Config view: Test connections below the service settings; hide a stale cursor

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 23:59:02 +02:00
co-authored by Claude Sonnet 5.5
parent 56bd80f7bb
commit 26e1679e4e
6 changed files with 112 additions and 11 deletions
+9 -6
View File
@@ -102,10 +102,11 @@ type settingsView struct {
app *App
root *tview.Flex
form *tview.Form // every field, one below the other, with section headings
actions *tview.Form // the buttons below it
groups []*tview.Form // keyboard order: the fields, then the buttons
status *tview.TextView
form *tview.Form // every field, one below the other, with section headings
testItem *formAction // the Test connections button, below the service settings
actions *tview.Form // the buttons below it
groups []*tview.Form // keyboard order: the fields, then the buttons
status *tview.TextView
inputs map[string]*tview.InputField // by setting key, e.g. "radarr.url"
refresh *tview.InputField
@@ -120,7 +121,7 @@ type settingsView struct {
}
func settingsHints() string {
return "↑↓ move through the fields · Space toggles · Enter presses a button · Tab jumps between fields and buttons"
return "↑↓ move through the fields · Space toggles or presses a button · Tab jumps between fields and Save/Revert"
}
func newSettingsView(app *App) *settingsView {
@@ -158,6 +159,9 @@ func newSettingsView(app *App) *settingsView {
service("Radarr", "radarr", true)
service("Sonarr", "sonarr", true)
service("SABnzbd", "sabnzbd", false)
// Right below the connection settings it checks.
v.testItem = newFormAction("Test connections", v.test)
f.AddFormItem(v.testItem)
f.AddFormItem(newFormHeading("Interface"))
v.refresh = tview.NewInputField().SetLabel("Downloads refresh (seconds)").SetFieldWidth(6)
@@ -177,7 +181,6 @@ func newSettingsView(app *App) *settingsView {
v.actions = tview.NewForm().SetItemPadding(0)
v.actions.SetBorder(true).SetTitle(" Actions ")
v.actions.SetBorderPadding(0, 0, 1, 1)
v.actions.AddButton("Test connections", v.test)
v.actions.AddButton("Save", v.save)
v.actions.AddButton("Revert", v.revert)