b5b7f6b6ee
Persistent left panel showing tags with counts. Provides ambient awareness of tag landscape without requiring a modal. - New tagRailModel in tagrail.go: tag list with cursor, scroll, counts - Rail visible at >=100 cols width, 18% width (min 16 chars) - ctrl+b toggles rail visibility - focusTagRail added to focus cycle: capture → tags → list → detail - j/k navigates, enter filters/unfilters by tag - Active filter tag highlighted bold in rail - Tags refresh after entity create/delete/absorb - Rail auto-hides on narrow terminals, # modal still works as fallback - Width allocation accounts for rail in split and non-split layouts
147 lines
3.5 KiB
Go
147 lines
3.5 KiB
Go
package tui
|
||
|
||
import "github.com/charmbracelet/lipgloss"
|
||
|
||
var (
|
||
subtle = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"}
|
||
highlight = lipgloss.AdaptiveColor{Light: "#874BFD", Dark: "#7D56F4"}
|
||
dim = lipgloss.AdaptiveColor{Light: "#A49FA5", Dark: "#777777"}
|
||
|
||
titleStyle = lipgloss.NewStyle().
|
||
Bold(true).
|
||
Foreground(highlight).
|
||
PaddingLeft(1)
|
||
|
||
statusStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
PaddingLeft(1)
|
||
|
||
listItemStyle = lipgloss.NewStyle().
|
||
PaddingLeft(2)
|
||
|
||
selectedItemStyle = lipgloss.NewStyle().
|
||
PaddingLeft(1).
|
||
Bold(true).
|
||
Foreground(highlight).
|
||
SetString("›")
|
||
|
||
glyphStyle = lipgloss.NewStyle().
|
||
Width(2)
|
||
|
||
completedGlyphStyle = lipgloss.NewStyle().
|
||
Width(2).
|
||
Foreground(dim)
|
||
|
||
tagStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"})
|
||
|
||
idStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
inputPromptStyle = lipgloss.NewStyle().
|
||
Foreground(highlight).
|
||
Bold(true)
|
||
|
||
detailHeaderStyle = lipgloss.NewStyle().
|
||
Bold(true).
|
||
Foreground(highlight).
|
||
MarginBottom(1)
|
||
|
||
detailBodyStyle = lipgloss.NewStyle().
|
||
PaddingLeft(2).
|
||
PaddingTop(1)
|
||
|
||
helpStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
PaddingLeft(1)
|
||
|
||
errorStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.Color("#FF0000")).
|
||
PaddingLeft(1)
|
||
|
||
dateHeaderStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
PaddingLeft(1)
|
||
|
||
pinnedStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#D4A017", Dark: "#FFD700"})
|
||
|
||
filterPillStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"}).
|
||
Bold(true)
|
||
|
||
helpKeyStyle = lipgloss.NewStyle().
|
||
Foreground(highlight).
|
||
Bold(true).
|
||
Width(18)
|
||
|
||
helpDescStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
affordanceStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#5B8EF0", Dark: "#7AAFFF"}).
|
||
Bold(true)
|
||
|
||
useCountStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#B07D3A", Dark: "#D4A54A"})
|
||
|
||
modeStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
Bold(true)
|
||
|
||
detailLabelStyle = lipgloss.NewStyle().
|
||
Foreground(highlight).
|
||
Bold(true)
|
||
|
||
detailValueStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#555555", Dark: "#BBBBBB"})
|
||
|
||
checkDoneStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"})
|
||
|
||
checkPendingStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
searchPillStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#E06C75", Dark: "#E06C75"}).
|
||
Bold(true)
|
||
|
||
gutterStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
drawerBorderStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
drawerHintsStyle = lipgloss.NewStyle().
|
||
Foreground(dim).
|
||
PaddingLeft(2)
|
||
|
||
drawerPreviewStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#555555", Dark: "#AAAAAA"}).
|
||
PaddingLeft(2)
|
||
|
||
separatorStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
hintKeyStyle = lipgloss.NewStyle().
|
||
Foreground(highlight).
|
||
Bold(true)
|
||
|
||
hintDescStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
|
||
railHeaderStyle = lipgloss.NewStyle().
|
||
Bold(true).
|
||
Foreground(dim)
|
||
|
||
railTagStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"})
|
||
|
||
railActiveTagStyle = lipgloss.NewStyle().
|
||
Foreground(lipgloss.AdaptiveColor{Light: "#43BF6D", Dark: "#73F59F"}).
|
||
Bold(true)
|
||
|
||
railCountStyle = lipgloss.NewStyle().
|
||
Foreground(dim)
|
||
)
|