diff --git a/internal/models/main.go b/internal/models/main.go index 106c4b8..e7b277d 100644 --- a/internal/models/main.go +++ b/internal/models/main.go @@ -13,8 +13,7 @@ const ( ) var mainStyle = lipgloss.NewStyle(). - BorderStyle(lipgloss.NormalBorder()). - BorderForeground(lipgloss.Color("#F7B3DA")) + BorderStyle(lipgloss.NormalBorder()) type mainModel struct { username string @@ -39,7 +38,7 @@ func NewMainModel(username, homeDir string) mainModel { // TODO(d1): programmatically fill in profile names profileBarModel := newProfileBarModel([]string{ - "status", + "status", "profile1", "profile2", "profile3", }) statusPaneModel := newStatusPaneModel() diff --git a/internal/models/pbar.go b/internal/models/pbar.go index cd94b5e..5801110 100644 --- a/internal/models/pbar.go +++ b/internal/models/pbar.go @@ -7,9 +7,10 @@ import ( "github.com/charmbracelet/lipgloss" ) -var profileBarStyle = lipgloss.NewStyle(). +var profileNameButtonStyle = lipgloss.NewStyle(). BorderStyle(lipgloss.NormalBorder()). - MarginLeft(1) + Padding(0, 1). + Bold(true) type profileBarModel struct { state int @@ -33,8 +34,8 @@ func (m profileBarModel) Init() tea.Cmd { } func (m profileBarModel) Update(msg tea.Msg) (profileBarModel, tea.Cmd) { + // TODO(d1): bubblezone handle clicks, fire msgs to mainModel to switch switch msg := msg.(type) { - //TODO(d1): bubblezone handle clicks, fire msgs to mainModel to switch case tea.WindowSizeMsg: m.width = msg.Width } @@ -43,7 +44,26 @@ func (m profileBarModel) Update(msg tea.Msg) (profileBarModel, tea.Cmd) { func (m profileBarModel) View() string { body := strings.Builder{} - //TODO(d1): render profile names, nice colours etc. - body.WriteString(profileBarStyle.Render("...profileBar...")) + + var profileNames []string + for idx, profileName := range m.profileNames { + rendered := profileNameButtonStyle.Render(profileName) + + if idx > 0 { + rendered = profileNameButtonStyle. + MarginLeft(1). + Render(profileName) + } + + profileNames = append(profileNames, rendered) + } + + body.WriteString( + lipgloss.JoinHorizontal( + lipgloss.Left, + profileNames..., + ), + ) + return body.String() } diff --git a/internal/models/spane.go b/internal/models/spane.go index c84ea63..1356870 100644 --- a/internal/models/spane.go +++ b/internal/models/spane.go @@ -10,7 +10,6 @@ import ( var viewportStyle = lipgloss.NewStyle(). BorderStyle(lipgloss.NormalBorder()). - BorderForeground(lipgloss.Color("#BBFFFF")). MarginLeft(1) type statusPaneModel struct { diff --git a/internal/models/title.go b/internal/models/title.go index 0aa1203..f3f4e3a 100644 --- a/internal/models/title.go +++ b/internal/models/title.go @@ -13,7 +13,6 @@ var titleStyle = lipgloss.NewStyle(). Bold(true) var backgroundStyle = lipgloss.NewStyle(). - Foreground(lipgloss.Color("#EE00EE")). Align(lipgloss.Center) type titleModel struct {