detached 9e30cff

feat(ui): hide AUR Helper field when Chaotic-AUR is disabled

The AUR Helper selection is now in a separate group that's hidden
when Chaotic-AUR is set to "No", since AUR helpers require
Chaotic-AUR to be enabled.
commit
9e30cffffae8b5480ae92df698c480a9fbaf2a1f
author
bnema · · 2025-10-31 06:15 UTC
parent
16f57b5
signature
GPG Unverified2B82207D370127A0 The key is unknown
1 file · +8 -1
M internal/ui/installer_forms.go +8 -1
@@ -145,14 +145,21 @@ func CreateOptionsForm(cfg *config.Config, fb *components.FormBuilder) *huh.Form
145145 Description(DescMultilib),
146146 fb.Confirm("Enable Chaotic-AUR?", "Yes", "No", &cfg.EnableChaotic).
147147 Description(DescChaoticAUR),
148+ )
149+
150+ // AUR Helper group (only shown when Chaotic-AUR is enabled)
151+ aurHelperGroup := huh.NewGroup(
148152 fb.SelectWithOptions("AUR Helper", aurOptions, &cfg.AURHelper).
149153 Description(DescAURHelper),
150- )
154+ ).WithHideFunc(func() bool {
155+ return !cfg.EnableChaotic
156+ })
151157
152158 // Build form groups list
153159 groups := []*huh.Group{
154160 systemBaseGroup,
155161 packageManagementGroup,
162+ aurHelperGroup,
156163 }
157164
158165 // Add AMD P-State tuning group (conditional - only for AMD CPUs)
@@ -145,14 +145,21 @@ func CreateOptionsForm(cfg *config.Config, fb *components.FormBuilder) *huh.Form
145 Description(DescMultilib),145 Description(DescMultilib),
146 fb.Confirm("Enable Chaotic-AUR?", "Yes", "No", &cfg.EnableChaotic).146 fb.Confirm("Enable Chaotic-AUR?", "Yes", "No", &cfg.EnableChaotic).
147 Description(DescChaoticAUR),147 Description(DescChaoticAUR),
148+ )
149+
150+ // AUR Helper group (only shown when Chaotic-AUR is enabled)
151+ aurHelperGroup := huh.NewGroup(
148 fb.SelectWithOptions("AUR Helper", aurOptions, &cfg.AURHelper).152 fb.SelectWithOptions("AUR Helper", aurOptions, &cfg.AURHelper).
149 Description(DescAURHelper),153 Description(DescAURHelper),
150- )154+ ).WithHideFunc(func() bool {
155+ return !cfg.EnableChaotic
156+ })
151 157
152 // Build form groups list158 // Build form groups list
153 groups := []*huh.Group{159 groups := []*huh.Group{
154 systemBaseGroup,160 systemBaseGroup,
155 packageManagementGroup,161 packageManagementGroup,
162+ aurHelperGroup,
156 }163 }
157 164
158 // Add AMD P-State tuning group (conditional - only for AMD CPUs)165 // Add AMD P-State tuning group (conditional - only for AMD CPUs)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close