parent
56c898fcb0
commit
d9629dd537
|
|
@ -265,7 +265,7 @@ func newStyle() Style {
|
|||
|
||||
func newDialog() Dialog {
|
||||
return Dialog{
|
||||
FgColor: "cadetBlue",
|
||||
FgColor: "cadetblue",
|
||||
BgColor: "black",
|
||||
ButtonBgColor: "darkslateblue",
|
||||
ButtonFgColor: "black",
|
||||
|
|
@ -278,7 +278,7 @@ func newDialog() Dialog {
|
|||
|
||||
func newPrompt() Prompt {
|
||||
return Prompt{
|
||||
FgColor: "cadetBlue",
|
||||
FgColor: "cadetblue",
|
||||
BgColor: "black",
|
||||
SuggestColor: "dodgerblue",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ func (p *PortForward) deleteCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
showModal(p.App().Content.Pages, msg, func() {
|
||||
showModal(p.App(), msg, func() {
|
||||
for _, s := range selections {
|
||||
var pf dao.PortForward
|
||||
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
|
||||
}
|
||||
|
||||
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().
|
||||
AddButtons([]string{"Cancel", "OK"}).
|
||||
SetButtonBackgroundColor(styles.ButtonBgColor.Color()).
|
||||
SetTextColor(tcell.ColorFuchsia).
|
||||
SetText(msg).
|
||||
SetDoneFunc(func(_ int, b string) {
|
||||
|
|
|
|||
|
|
@ -79,8 +79,10 @@ func (r *ReplicaSet) dismissModal() {
|
|||
}
|
||||
|
||||
func (r *ReplicaSet) showModal(msg string, done func(int, string)) {
|
||||
styles := r.App().Styles.Dialog()
|
||||
confirm := tview.NewModal().
|
||||
AddButtons([]string{"Cancel", "OK"}).
|
||||
SetButtonBackgroundColor(styles.ButtonBgColor.Color()).
|
||||
SetTextColor(tcell.ColorFuchsia).
|
||||
SetText(msg).
|
||||
SetDoneFunc(done)
|
||||
|
|
|
|||
Loading…
Reference in New Issue