Fix PF and RS colors (#1656)

Co-authored-by: Aleksei Romanenko <alex.romanenko@linkup.com>
mine
Aleksei Romanenko 2022-07-16 09:35:50 -05:00 committed by GitHub
parent 56c898fcb0
commit d9629dd537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -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",
}

View File

@ -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) {

View File

@ -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)