diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-07-08 18:35:20 +0300 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-07-08 18:35:20 +0300 |
| commit | 56acb0d51e93ddd528422253137a3692d9bdc8de (patch) | |
| tree | 8b2037697f2ebc04d52d3d4390af340cdf6d3c70 /internal | |
| parent | a34919da2f3c3102434635276250cc4d398c8492 (diff) | |
Color coded accept/decline in TOS page
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/client/ui/tosscreen/tosscreen.go | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/internal/client/ui/tosscreen/tosscreen.go b/internal/client/ui/tosscreen/tosscreen.go index 317a724..fe948c7 100644 --- a/internal/client/ui/tosscreen/tosscreen.go +++ b/internal/client/ui/tosscreen/tosscreen.go @@ -47,7 +47,26 @@ func (m Model) Init() tea.Cmd { } func (m Model) View() string { - footer := "-- Accept | ^C Decline | ↑↓ or J/K Scroll | ^D/^U PgDn/PgUp --" + sepStyle := lipgloss.NewStyle().Background(colors.BackgroundDimmer).Foreground(colors.Purple) + + var b strings.Builder + + accept := lipgloss.NewStyle(). + Background(colors.BackgroundDimmer). + Foreground(colors.Green). + Render(" Accept") + decline := lipgloss.NewStyle(). + Background(colors.BackgroundDimmer). + Foreground(colors.Red). + Render("^C Decline") + + b.WriteString(sepStyle.Render("-- ")) + b.WriteString(accept) + b.WriteString(sepStyle.Render(" | ")) + b.WriteString(decline) + b.WriteString(sepStyle.Render(" | ↑↓ or J/K Scroll | ^D/^U PgDn/PgUp --")) + + footer := b.String() fWidth := lipgloss.Width(footer) paddingLeft := (ui.Width - fWidth) / 2 @@ -191,10 +210,7 @@ func MdStyle() ansi.StyleConfig { Ticked: "[✓] ", Unticked: "[ ] ", }, - Link: ansi.StylePrimitive{ - - // Format: "Bozo", - }, + Link: ansi.StylePrimitive{}, LinkText: ansi.StylePrimitive{ Color: stringPtr(colors.Gold), Bold: boolPtr(true), |
