This commit is contained in:
Clément PÉAU 2026-04-20 15:22:33 +00:00 committed by GitHub
commit 7cd93976fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 0 deletions

View file

@ -32,6 +32,8 @@ func (b *Binding) GetKey() string {
switch key {
case 27:
return "esc"
case 12:
return "Ctrl+L"
case 13:
return "enter"
case 32:
@ -185,6 +187,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Modifier: gocui.ModNone,
Handler: gui.handleDonate,
},
{
ViewName: "containers",
Key: gocui.KeyCtrlL,
Modifier: gocui.ModNone,
Handler: wrappedHandler(gui.handleClearMain),
Description: gui.Tr.ClearMain,
},
{
ViewName: "containers",
Key: 'd',
@ -262,6 +271,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Handler: gui.handleContainersOpenInBrowserCommand,
Description: gui.Tr.OpenInBrowser,
},
{
ViewName: "services",
Key: gocui.KeyCtrlL,
Modifier: gocui.ModNone,
Handler: wrappedHandler(gui.handleClearMain),
Description: gui.Tr.ClearMain,
},
{
ViewName: "services",
Key: 'u',
@ -449,6 +465,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Modifier: gocui.ModNone,
Handler: gui.scrollRightMain,
},
{
ViewName: "main",
Key: gocui.KeyCtrlL,
Modifier: gocui.ModNone,
Handler: wrappedHandler(gui.handleClearMain),
Description: gui.Tr.ClearMain,
},
{
ViewName: "main",
Key: 'h',

View file

@ -111,3 +111,12 @@ func (gui *Gui) handleMainClick() error {
return gui.switchFocus(gui.Views.Main)
}
func (gui *Gui) handleClearMain() error {
if gui.popupPanelFocused() {
return nil
}
gui.clearMainView()
return nil
}

View file

@ -128,6 +128,7 @@ type TranslationSet struct {
LcNextScreenMode string
LcPrevScreenMode string
ClearMain string
FilterPrompt string
FocusProjects string
@ -271,6 +272,7 @@ func englishSet() TranslationSet {
LcNextScreenMode: "next screen mode (normal/half/fullscreen)",
LcPrevScreenMode: "prev screen mode",
ClearMain: "clear main panel",
FilterPrompt: "filter",
FocusProjects: "focus projects panel",