From 131404cfa288ffada18963b331128936356605cb Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Tue, 6 Aug 2024 15:08:03 +0530 Subject: [PATCH] update --- pkg/model/credential/credential.go | 2 +- pkg/model/status.go | 8 ++++---- pkg/model/timerange.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/model/credential/credential.go b/pkg/model/credential/credential.go index d906d7b..7b190d5 100644 --- a/pkg/model/credential/credential.go +++ b/pkg/model/credential/credential.go @@ -71,7 +71,7 @@ func New() Model { var t textinput.Model for i := range m.inputs { t = textinput.New() - t.Cursor.Style = focusedStyle.Copy() + t.Cursor.Style = focusedStyle t.CharLimit = 32 switch i { diff --git a/pkg/model/status.go b/pkg/model/status.go index 129244f..1000d43 100644 --- a/pkg/model/status.go +++ b/pkg/model/status.go @@ -24,19 +24,19 @@ import ( var ( commonStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#FFFFFF", Dark: "#000000"}) - titleStyle = commonStyle.Copy(). + titleStyle = commonStyle. Background(lipgloss.AdaptiveColor{Light: "#134074", Dark: "#FFADAD"}). Padding(0, 1) - hostStyle = commonStyle.Copy(). + hostStyle = commonStyle. Background(lipgloss.AdaptiveColor{Light: "#13315C", Dark: "#FFD6A5"}). Padding(0, 1) - infoStyle = commonStyle.Copy(). + infoStyle = commonStyle. Background(lipgloss.AdaptiveColor{Light: "#212529", Dark: "#CAFFBF"}). AlignHorizontal(lipgloss.Right) - errorStyle = commonStyle.Copy(). + errorStyle = commonStyle. Background(lipgloss.AdaptiveColor{Light: "#5A2A27", Dark: "#D4A373"}). AlignHorizontal(lipgloss.Right) ) diff --git a/pkg/model/timerange.go b/pkg/model/timerange.go index b77337c..2a394fb 100644 --- a/pkg/model/timerange.go +++ b/pkg/model/timerange.go @@ -90,8 +90,8 @@ func NewTimeRangeModel() list.Model { list.SetShowHelp(false) list.SetShowFilter(false) list.SetShowTitle(true) - list.Styles.TitleBar = baseStyle.Copy() - list.Styles.Title = baseStyle.Copy().MarginBottom(1) + list.Styles.TitleBar = baseStyle + list.Styles.Title = baseStyle.MarginBottom(1) list.Styles.TitleBar.Align(lipgloss.Left) list.Title = "Select Time Range" list.SetShowStatusBar(false)