diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-05 19:34:01 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-05 19:34:01 +0200 |
| commit | 5fe164e91e40e8a3f749f4143f7562f940bf9f67 (patch) | |
| tree | d77b03c737628fa58171de28eb89720c96f203b2 /internal/tui/probes | |
| parent | a44f6ee30c11963552b5b90a19698873aa9b6b6d (diff) | |
feat(tui): detect terminal theme and apply palettes
Diffstat (limited to 'internal/tui/probes')
| -rw-r--r-- | internal/tui/probes/model.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/tui/probes/model.go b/internal/tui/probes/model.go index c4512f9..7da27db 100644 --- a/internal/tui/probes/model.go +++ b/internal/tui/probes/model.go @@ -39,6 +39,7 @@ type Model struct { lastErr string manager Manager height int + isDark bool } func NewModel(manager Manager) Model { @@ -46,9 +47,11 @@ func NewModel(manager Manager) Model { ti.Prompt = "/ " ti.CharLimit = 0 ti.SetWidth(28) + ti.SetStyles(textinput.DefaultStyles(true)) return Model{ manager: manager, textInput: ti, + isDark: true, } } @@ -72,6 +75,13 @@ func (m Model) Close() Model { return m } +// SetDarkMode updates probe modal text input styles. +func (m Model) SetDarkMode(isDark bool) Model { + m.isDark = isDark + m.textInput.SetStyles(textinput.DefaultStyles(isDark)) + return m +} + func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) { if !m.visible { return m, nil |
