Skip to content

Commit

Permalink
styling tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
lineville committed Dec 18, 2023
1 parent e54413b commit bd5c9e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/delegates.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ func formatMatchScore(match Match, playerName string) string {
scoreString += ")"

if strings.Contains(winner, playerName) {
return greenStyle.Render("\n " + scoreString)
return greenStyle.Render("\n " + scoreString)
} else {
return redStyle.Render("\n " + scoreString)
return redStyle.Render("\n " + scoreString)
}
}

Expand Down
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ func initialModel(args ...string) model {
playerList := list.New(nil, internal.Player{}, 40, 20)
playerList.Title = "Select a player"
playerList.Styles.TitleBar.PaddingLeft(2)
playerList.Styles.Title.AlignHorizontal(lipgloss.Center)
playerList.Styles.Title.Background(lipgloss.Color("#25CCF7"))
playerList.SetStatusBarItemName("player", "players")

resultsList := list.New(nil, internal.Event{}, 40, 20)
resultsList.Title = ""
resultsList.Styles.TitleBar.PaddingLeft(2)
resultsList.Styles.Title.AlignHorizontal(lipgloss.Center)
resultsList.Styles.TitleBar.PaddingLeft(2)
resultsList.Styles.Title.Background(lipgloss.Color("#25CCF7"))
resultsList.SetStatusBarItemName("event", "events")

Expand Down Expand Up @@ -176,7 +179,6 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, nil

case internal.Profile:
m.loading = false
m.resultsList.Title = m.selectedPlayer.(internal.Player).Source.DisplayName + "'s Match Results"
m.resultsList.Title += fmt.Sprintf("\n\nUTR (Singles: %.2f / Doubles: %.2f)", msg.SinglesUTR, msg.DoublesUTR)
return m, internal.PlayerResults(m.selectedPlayer.(internal.Player).Source.Id)
Expand Down Expand Up @@ -208,9 +210,9 @@ func (m model) View() string {
}
if m.loading {
if m.selectedPlayer != nil {
return "\n\n" + m.spinner.View() + " Searching for " + m.selectedPlayer.(internal.Player).Source.DisplayName + "'s match results..."
return "\n\n" + m.spinner.View() + " Searching for " + m.selectedPlayer.(internal.Player).Source.DisplayName + "'s match results"
} else {
return "\n\n" + m.spinner.View() + " Searching for players..."
return "\n\n" + m.spinner.View() + " Searching for " + m.searchQuery.Value()
}
}
if m.selectedPlayer != nil {
Expand Down

0 comments on commit bd5c9e8

Please sign in to comment.