gui: show gg/G shortcuts in the options bar for the main panel

When the main panel is focused (e.g. the Container Config screen) the options
bar now lists the gg/G scroll-to-top/bottom shortcuts alongside the existing
scroll and navigation hints.
This commit is contained in:
suhird.singh 2026-06-24 13:40:11 -04:00
parent a20fa161cc
commit 4298b4cfaa
2 changed files with 12 additions and 0 deletions

View file

@ -171,6 +171,16 @@ func (gui *Gui) renderGlobalOptions() error {
})
}
func (gui *Gui) renderMainOptions() error {
return gui.renderOptionsMap(map[string]string{
"PgUp/PgDn": gui.Tr.Scroll,
"← → ↑ ↓": gui.Tr.Navigate,
"gg": gui.Tr.GotoTop,
"G": gui.Tr.GotoBottom,
"esc": gui.Tr.Return,
})
}
func (gui *Gui) goEvery(interval time.Duration, function func() error) {
_ = function() // time.Tick doesn't run immediately so we'll do that here // TODO: maybe change
go func() {

View file

@ -230,6 +230,8 @@ func (gui *Gui) renderPanelOptions() error {
return gui.renderMenuOptions()
case "confirmation":
return gui.renderConfirmationOptions()
case "main":
return gui.renderMainOptions()
}
return gui.renderGlobalOptions()
}