mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
more progress
This commit is contained in:
parent
4a76f7b65e
commit
9ad6181420
4 changed files with 48 additions and 23 deletions
|
|
@ -272,7 +272,7 @@ func (gui *Gui) handleContainersPrevContext(g *gocui.Gui, v *gocui.View) error {
|
||||||
gui.State.Panels.Containers.ContextIndex++
|
gui.State.Panels.Containers.ContextIndex++
|
||||||
}
|
}
|
||||||
|
|
||||||
gui.handleContainerSelect(gui.g, v, true)
|
gui.handleContainerSelect(gui.g, v, false)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -285,7 +285,7 @@ func (gui *Gui) handleContainersNextContext(g *gocui.Gui, v *gocui.View) error {
|
||||||
gui.State.Panels.Containers.ContextIndex--
|
gui.State.Panels.Containers.ContextIndex--
|
||||||
}
|
}
|
||||||
|
|
||||||
gui.handleContainerSelect(gui.g, v, true)
|
gui.handleContainerSelect(gui.g, v, false)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,33 +139,38 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||||
Modifier: gocui.ModNone,
|
Modifier: gocui.ModNone,
|
||||||
Handler: gui.handleDonate,
|
Handler: gui.handleDonate,
|
||||||
}, {
|
}, {
|
||||||
ViewName: "containers",
|
ViewName: "containers",
|
||||||
Key: '[',
|
Key: '[',
|
||||||
Modifier: gocui.ModNone,
|
Modifier: gocui.ModNone,
|
||||||
Handler: gui.handleContainersPrevContext,
|
Handler: gui.handleContainersPrevContext,
|
||||||
|
Description: gui.Tr.SLocalize("previousContext"),
|
||||||
}, {
|
}, {
|
||||||
ViewName: "containers",
|
ViewName: "containers",
|
||||||
Key: ']',
|
Key: ']',
|
||||||
Modifier: gocui.ModNone,
|
Modifier: gocui.ModNone,
|
||||||
Handler: gui.handleContainersNextContext,
|
Handler: gui.handleContainersNextContext,
|
||||||
|
Description: gui.Tr.SLocalize("nextContext"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ViewName: "containers",
|
ViewName: "containers",
|
||||||
Key: 'd',
|
Key: 'd',
|
||||||
Modifier: gocui.ModNone,
|
Modifier: gocui.ModNone,
|
||||||
Handler: gui.handleContainersRemoveMenu,
|
Handler: gui.handleContainersRemoveMenu,
|
||||||
|
Description: gui.Tr.SLocalize("removeContainer"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ViewName: "containers",
|
ViewName: "containers",
|
||||||
Key: 's',
|
Key: 's',
|
||||||
Modifier: gocui.ModNone,
|
Modifier: gocui.ModNone,
|
||||||
Handler: gui.handleContainerStop,
|
Handler: gui.handleContainerStop,
|
||||||
|
Description: gui.Tr.SLocalize("stopContainer"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ViewName: "containers",
|
ViewName: "containers",
|
||||||
Key: 'r',
|
Key: 'r',
|
||||||
Modifier: gocui.ModNone,
|
Modifier: gocui.ModNone,
|
||||||
Handler: gui.handleContainerRestart,
|
Handler: gui.handleContainerRestart,
|
||||||
|
Description: gui.Tr.SLocalize("restartContainer"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ func (gui *Gui) newLineFocused(g *gocui.Gui, v *gocui.View) error {
|
||||||
case "status":
|
case "status":
|
||||||
return gui.handleStatusSelect(g, v)
|
return gui.handleStatusSelect(g, v)
|
||||||
case "containers":
|
case "containers":
|
||||||
return gui.handleContainerSelect(g, v, false)
|
return gui.handleContainerSelect(g, v, true)
|
||||||
case "confirmation":
|
case "confirmation":
|
||||||
return nil
|
return nil
|
||||||
case "main":
|
case "main":
|
||||||
|
|
|
||||||
|
|
@ -786,5 +786,25 @@ func addEnglish(i18nObject *i18n.Bundle) error {
|
||||||
ID: "RestartingStatus",
|
ID: "RestartingStatus",
|
||||||
Other: "restarting",
|
Other: "restarting",
|
||||||
},
|
},
|
||||||
|
&i18n.Message{
|
||||||
|
ID: "removeContainer",
|
||||||
|
Other: "remove container",
|
||||||
|
},
|
||||||
|
&i18n.Message{
|
||||||
|
ID: "stopContainer",
|
||||||
|
Other: "stop container",
|
||||||
|
},
|
||||||
|
&i18n.Message{
|
||||||
|
ID: "restartContainer",
|
||||||
|
Other: "restart container",
|
||||||
|
},
|
||||||
|
&i18n.Message{
|
||||||
|
ID: "previousContext",
|
||||||
|
Other: "previous context",
|
||||||
|
},
|
||||||
|
&i18n.Message{
|
||||||
|
ID: "nextContext",
|
||||||
|
Other: "next context",
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue