feat(theme): token semantik Catppuccin (Mocha/Latte/terminal) + mode auto via tea.BackgroundColorMsg + tombol T
CI / test (push) Successful in 11s

This commit is contained in:
oxpoe committed 2026-10-15 13:32:55 +07:00
1 parent c65d2cb75d
commit 8b2a86877e
13 files changed
+428 -37

No files matched your search

+7 -5
View File
@@ -10,6 +10,7 @@ import (
"gitea.oxpoe.qzz.io/oxpoe/tia-love/internal/i18n"
"gitea.oxpoe.qzz.io/oxpoe/tia-love/internal/ui/components"
"gitea.oxpoe.qzz.io/oxpoe/tia-love/internal/ui/theme"
)
// homeBody — dashboard beranda (F-027). Tata letak terinspirasi mirador:
@@ -51,7 +52,7 @@ func (m Model) clockPanel(w, h int) string {
now := time.Now()
rows := components.CenterBlock(components.RenderClock(now), w-4)
for i, r := range rows {
rows[i] = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#cba6f7")).Render(r)
rows[i] = theme.Style(theme.Current().Accent).Bold(true).Render(r)
}
tanggal := fmt.Sprintf("%d %s %d", now.Day(), i18n.MonthName(now), now.Year())
lines := append(rows, "", dim(" "+i18n.WeekdayName(now)+", "+tanggal+" · "+now.Format("MST")))
@@ -75,7 +76,7 @@ func (m Model) dockerPanel(w, h int) string {
fieldW(i18n.T("section.containers"), 9)+dim(i18n.Tf("fmt.dockerContainers", m.engine.Running, m.engine.Containers)),
fieldW(i18n.T("field.image"), 9)+dim(fmt.Sprintf("%d", m.engine.Images)),
"",
styled("#a6e3a1", i18n.T("state.connected")),
styled(theme.Current().Success, i18n.T("state.connected")),
)
}
return panel("Docker", i18n.T("host.local"), lines, w, h, false)
@@ -174,12 +175,13 @@ func memBar(pct, w int) string {
if fill > w {
fill = w
}
color := "#a6e3a1"
th := theme.Current()
color := th.Success
switch {
case pct >= 85:
color = "#f38ba8"
color = th.Danger
case pct >= 60:
color = "#f9e2af"
color = th.Warning
}
return styled(color, strings.Repeat("█", fill)) + dim(strings.Repeat("░", w-fill))
}