Change summary
ui/components/selector/selector.go | 1 +
ui/pages/repo/readme.go | 2 +-
ui/styles/styles.go | 11 +++--------
3 files changed, 5 insertions(+), 9 deletions(-)
Detailed changes
@@ -40,6 +40,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
s := &Selector{
Model: l,
common: common,
@@ -28,7 +28,7 @@ type Readme struct {
// NewReadme creates a new readme model.
func NewReadme(common common.Common) *Readme {
readme := code.New(common, "", "")
- readme.NoContentStyle = readme.NoContentStyle.SetString("No readme found.")
+ readme.NoContentStyle = readme.NoContentStyle.Copy().SetString("No readme found.")
return &Readme{
code: readme,
common: common,
@@ -59,8 +59,6 @@ type Styles struct {
ErrorTitle lipgloss.Style
ErrorBody lipgloss.Style
- AboutNoReadme lipgloss.Style
-
LogItem struct {
Normal struct {
Base lipgloss.Style
@@ -277,11 +275,6 @@ func DefaultStyles() *Styles {
Foreground(lipgloss.Color("252")).
MarginLeft(2)
- s.AboutNoReadme = lipgloss.NewStyle().
- MarginTop(1).
- MarginLeft(2).
- Foreground(lipgloss.Color("242"))
-
s.LogItem.Normal.Base = lipgloss.NewStyle().
Border(lipgloss.Border{
Left: " ",
@@ -417,7 +410,9 @@ func DefaultStyles() *Styles {
MarginLeft(2).
Foreground(lipgloss.Color("242"))
- s.NoItems = s.AboutNoReadme.Copy()
+ s.NoItems = lipgloss.NewStyle().
+ MarginLeft(2).
+ Foreground(lipgloss.Color("242"))
s.StatusBar = lipgloss.NewStyle().
Height(1)