fix typo and clean up prs

mine
derailed 2020-12-04 05:20:13 -07:00
parent 35799ab743
commit 730494af98
2 changed files with 3 additions and 5 deletions

View File

@ -56,7 +56,7 @@ func (h *Help) Init(ctx context.Context) error {
} }
func (h *Help) bindKeys() { func (h *Help) bindKeys() {
h.Actions().Delete(ui.KeySpace, tcell.KeyCtrlSpace, tcell.KeyCtrlS), ui.KeySlash) h.Actions().Delete(ui.KeySpace, tcell.KeyCtrlSpace, tcell.KeyCtrlS, ui.KeySlash)
h.Actions().Set(ui.KeyActions{ h.Actions().Set(ui.KeyActions{
tcell.KeyEscape: ui.NewKeyAction("Back", h.app.PrevCmd, true), tcell.KeyEscape: ui.NewKeyAction("Back", h.app.PrevCmd, true),
ui.KeyHelp: ui.NewKeyAction("Back", h.app.PrevCmd, false), ui.KeyHelp: ui.NewKeyAction("Back", h.app.PrevCmd, false),

View File

@ -31,8 +31,8 @@ func ShowPortForwards(v ResourceViewer, path string, ports []string, okFn PortFo
address := v.App().Config.CurrentCluster().PortForwardAddress address := v.App().Config.CurrentCluster().PortForwardAddress
p1, p2 := "", "" var p1, p2 string
if len(ports) != 0 { if len(ports) > 0 {
p1, p2 = ports[0], extractPort(ports[0]) p1, p2 = ports[0], extractPort(ports[0])
} }
@ -88,8 +88,6 @@ func ShowPortForwards(v ResourceViewer, path string, ports []string, okFn PortFo
if len(ports) != 0 { if len(ports) != 0 {
modal.SetText("Exposed Ports: " + strings.Join(ports, ",")) modal.SetText("Exposed Ports: " + strings.Join(ports, ","))
} else {
modal.SetText("Exposed Ports: (none)")
} }
modal.SetTextColor(styles.FgColor.Color()) modal.SetTextColor(styles.FgColor.Color())