X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/06e9400384f1d3a8d13006e70fd34532fcbfc59f..40afb444ff58289700baa1eb07f3f92d4731436d:/hotline/ui.go diff --git a/hotline/ui.go b/hotline/ui.go index 406c88f..e4dafd5 100644 --- a/hotline/ui.go +++ b/hotline/ui.go @@ -22,7 +22,6 @@ type UI struct { userList *tview.TextView agreeModal *tview.Modal trackerList *tview.List - settingsPage *tview.Box HLClient *Client } @@ -40,7 +39,7 @@ func NewUI(c *Client) *UI { SetChangedFunc(func() { app.Draw() // TODO: docs say this is bad but it's the only way to show content during initial render?? }) - chatBox.Box.SetBorder(true).SetTitle("Chat") + chatBox.Box.SetBorder(true).SetTitle("| Chat |") chatInput := tview.NewInputField() chatInput. @@ -206,12 +205,10 @@ func (ui *UI) joinServer(addr, login, password string) error { if err != nil { ui.HLClient.Logger.Errorw("read error", "err", err) - msg := err.Error() if err == io.EOF { - msg = "The server connection has unexpectedly closed." loginErrModal := tview.NewModal(). AddButtons([]string{"Ok"}). - SetText(msg). + SetText("The server connection has closed."). SetDoneFunc(func(buttonIndex int, buttonLabel string) { ui.Pages.SwitchToPage("home") })