parent
56c898fcb0
commit
d9629dd537
|
|
@ -265,7 +265,7 @@ func newStyle() Style {
|
||||||
|
|
||||||
func newDialog() Dialog {
|
func newDialog() Dialog {
|
||||||
return Dialog{
|
return Dialog{
|
||||||
FgColor: "cadetBlue",
|
FgColor: "cadetblue",
|
||||||
BgColor: "black",
|
BgColor: "black",
|
||||||
ButtonBgColor: "darkslateblue",
|
ButtonBgColor: "darkslateblue",
|
||||||
ButtonFgColor: "black",
|
ButtonFgColor: "black",
|
||||||
|
|
@ -278,7 +278,7 @@ func newDialog() Dialog {
|
||||||
|
|
||||||
func newPrompt() Prompt {
|
func newPrompt() Prompt {
|
||||||
return Prompt{
|
return Prompt{
|
||||||
FgColor: "cadetBlue",
|
FgColor: "cadetblue",
|
||||||
BgColor: "black",
|
BgColor: "black",
|
||||||
SuggestColor: "dodgerblue",
|
SuggestColor: "dodgerblue",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ func (p *PortForward) deleteCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
showModal(p.App().Content.Pages, msg, func() {
|
showModal(p.App(), msg, func() {
|
||||||
for _, s := range selections {
|
for _, s := range selections {
|
||||||
var pf dao.PortForward
|
var pf dao.PortForward
|
||||||
pf.Init(p.App().factory, client.NewGVR("portforwards"))
|
pf.Init(p.App().factory, client.NewGVR("portforwards"))
|
||||||
|
|
@ -187,9 +187,12 @@ func pfToHuman(s string) (string, error) {
|
||||||
return fmt.Sprintf("%s::%s %s->%s", mm[2], mm[3], mm[4], mm[5]), nil
|
return fmt.Sprintf("%s::%s %s->%s", mm[2], mm[3], mm[4], mm[5]), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func showModal(p *ui.Pages, msg string, ok func()) {
|
func showModal(a *App, msg string, ok func()) {
|
||||||
|
p := a.Content.Pages
|
||||||
|
styles := a.Styles.Dialog()
|
||||||
m := tview.NewModal().
|
m := tview.NewModal().
|
||||||
AddButtons([]string{"Cancel", "OK"}).
|
AddButtons([]string{"Cancel", "OK"}).
|
||||||
|
SetButtonBackgroundColor(styles.ButtonBgColor.Color()).
|
||||||
SetTextColor(tcell.ColorFuchsia).
|
SetTextColor(tcell.ColorFuchsia).
|
||||||
SetText(msg).
|
SetText(msg).
|
||||||
SetDoneFunc(func(_ int, b string) {
|
SetDoneFunc(func(_ int, b string) {
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,10 @@ func (r *ReplicaSet) dismissModal() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *ReplicaSet) showModal(msg string, done func(int, string)) {
|
func (r *ReplicaSet) showModal(msg string, done func(int, string)) {
|
||||||
|
styles := r.App().Styles.Dialog()
|
||||||
confirm := tview.NewModal().
|
confirm := tview.NewModal().
|
||||||
AddButtons([]string{"Cancel", "OK"}).
|
AddButtons([]string{"Cancel", "OK"}).
|
||||||
|
SetButtonBackgroundColor(styles.ButtonBgColor.Color()).
|
||||||
SetTextColor(tcell.ColorFuchsia).
|
SetTextColor(tcell.ColorFuchsia).
|
||||||
SetText(msg).
|
SetText(msg).
|
||||||
SetDoneFunc(done)
|
SetDoneFunc(done)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue