diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-02-07 19:52:11 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-02-07 19:52:11 +0200 |
| commit | 4776d42ccc4f1a7cda02d5e31510031ffc92ea3a (patch) | |
| tree | ff23de77025b51e8395f7424f999b3da7c78dd9a /internal/client/ui/field/field.go | |
| parent | e396129e07f5b3f8de1522acb0ee86bb63712a04 (diff) | |
User settings colors are now runtime-friendly except for fields which
have an issue (effects all popups and anything else that uses them),
seems to be an issue in charm
Diffstat (limited to 'internal/client/ui/field/field.go')
| -rw-r--r-- | internal/client/ui/field/field.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/client/ui/field/field.go b/internal/client/ui/field/field.go index 8cdaced..5ce8a10 100644 --- a/internal/client/ui/field/field.go +++ b/internal/client/ui/field/field.go @@ -6,6 +6,7 @@ import ( "github.com/charmbracelet/lipgloss" "github.com/kyren223/eko/internal/client/ui" + "github.com/kyren223/eko/internal/client/ui/colors" ) type Model struct { @@ -67,7 +68,9 @@ func (m Model) View() string { Render(header + m.ErrorStyle.Render(" - "+error)) } - field := ui.AddBorderHeader(header, 1, style, m.Input.View()+m.icon) + input := m.Input.View() + m.icon + + field := ui.AddBorderHeader(header, 1, style, input) return field } @@ -84,6 +87,9 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) { func (m *Model) Focus() tea.Cmd { m.Input.PromptStyle = m.FocusedTextStyle m.Input.TextStyle = m.FocusedTextStyle + m.Input.Cursor.Style = lipgloss.NewStyle() + // Background(m.FocusedTextStyle.GetForeground()). + // Foreground(m.FocusedTextStyle.GetBackground()) return m.Input.Focus() } @@ -91,6 +97,9 @@ func (m *Model) Blur() { m.Input.Blur() m.Input.PromptStyle = m.BlurredTextStyle m.Input.TextStyle = m.BlurredTextStyle + // m.Input.Cursor.Style = lipgloss.NewStyle(). + // Background(m.BlurredTextStyle.GetForeground()). + // Foreground(m.BlurredTextStyle.GetBackground()) } func (m *Model) SetWidth(width int) { |
