Skip to content

Commit

Permalink
Fixes background color of status messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgerojas26 committed Jan 18, 2024
1 parent 9389fcf commit 1c1e4b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions components/ConnectionForm.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func NewConnectionForm(connectionPages *models.ConnectionPages) *ConnectionForm
buttonsWrapper.AddItem(cancelButton, 0, 1, false)

statusText := tview.NewTextView()
statusText.SetBackgroundColor(tcell.ColorDefault)
statusText.SetBorderPadding(0, 1, 0, 0)

wrapper.AddItem(addForm, 0, 1, true)
Expand Down Expand Up @@ -144,7 +143,7 @@ func (form *ConnectionForm) inputCapture(connectionPages *models.ConnectionPages
}

func (form *ConnectionForm) testConnection(connectionString string) {
form.StatusText.SetText("Connecting...").SetTextStyle(tcell.StyleDefault.Foreground(tcell.ColorKhaki.TrueColor()))
form.StatusText.SetText("Connecting...").SetTextColor(tcell.ColorGreen)

db := drivers.MySQL{}

Expand All @@ -153,7 +152,7 @@ func (form *ConnectionForm) testConnection(connectionString string) {
if err != nil {
form.StatusText.SetText(err.Error()).SetTextStyle(tcell.StyleDefault.Foreground(tcell.ColorRed))
} else {
form.StatusText.SetText("Connection success").SetTextStyle(tcell.StyleDefault.Foreground(tcell.ColorKhaki.TrueColor()))
form.StatusText.SetText("Connection success").SetTextColor(tcell.ColorGreen)
}
App.ForceDraw()
}
Expand Down
2 changes: 1 addition & 1 deletion components/ConnectionSelection.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (cs *ConnectionSelection) connect(connectionUrl string) {
MainPages.SwitchToPage(connectionUrl)
App.Draw()
} else {
cs.StatusText.SetText("Connecting...").SetTextStyle(tcell.StyleDefault.Foreground(app.ActiveTextColor))
cs.StatusText.SetText("Connecting...").SetTextColor(tcell.ColorGreen)
App.Draw()

var newDbDriver drivers.Driver
Expand Down

0 comments on commit 1c1e4b3

Please sign in to comment.