Skip to content

Commit

Permalink
fix(ui): match readme and list missing items styles
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Oct 16, 2023
1 parent 4014bc0 commit b887ca6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion server/ui/components/code/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func New(c common.Common, content, extension string) *Code {
content: content,
extension: extension,
Viewport: vp.New(c),
NoContentStyle: c.Styles.NoContent.Copy(),
NoContentStyle: c.Styles.NoContent.Copy().SetString("No Content."),
LineDigitStyle: lineDigitStyle,
LineBarStyle: lineBarStyle,
}
Expand Down
2 changes: 1 addition & 1 deletion server/ui/components/selector/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func New(common common.Common, items []IdentifiableItem, delegate ItemDelegate)
itms[i] = item
}
l := list.New(itms, delegate, common.Width, common.Height)
l.Styles.NoItems = common.Styles.NoItems
l.Styles.NoItems = common.Styles.NoContent
s := &Selector{
Model: &l,
common: common,
Expand Down
7 changes: 0 additions & 7 deletions server/ui/styles/styles.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ type Styles struct {

NoContent lipgloss.Style

NoItems lipgloss.Style

StatusBar lipgloss.Style
StatusBarKey lipgloss.Style
StatusBarValue lipgloss.Style
Expand Down Expand Up @@ -430,15 +428,10 @@ func DefaultStyles() *Styles {
s.SpinnerContainer = lipgloss.NewStyle()

s.NoContent = lipgloss.NewStyle().
SetString("No Content.").
MarginTop(1).
MarginLeft(2).
Foreground(lipgloss.Color("242"))

s.NoItems = lipgloss.NewStyle().
MarginLeft(2).
Foreground(lipgloss.Color("242"))

s.StatusBar = lipgloss.NewStyle().
Height(1)

Expand Down

0 comments on commit b887ca6

Please sign in to comment.