feat(tui): implement dark mode with runtime /theme switching
- Paint dark background at app shell level via appStyle() helper - Add /theme slash command for runtime light/dark switching - Add comprehensive dark-mode style tests - Document --theme dark in README Quick Start
This commit is contained in:
@@ -130,10 +130,17 @@ func darkTheme() theme {
|
||||
}
|
||||
}
|
||||
|
||||
func appStyle(t theme) lipgloss.Style {
|
||||
style := lipgloss.NewStyle().Foreground(lipgloss.Color(t.Text))
|
||||
if t.Mode == ThemeDark {
|
||||
style = style.Background(lipgloss.Color(t.Background))
|
||||
}
|
||||
return style
|
||||
}
|
||||
|
||||
func (t theme) styles() styles {
|
||||
return styles{
|
||||
App: lipgloss.NewStyle().
|
||||
Foreground(lipgloss.Color(t.Text)),
|
||||
App: appStyle(t),
|
||||
|
||||
Muted: lipgloss.NewStyle().
|
||||
Foreground(lipgloss.Color(t.Muted)),
|
||||
|
||||
Reference in New Issue
Block a user