summaryrefslogtreecommitdiff
path: root/internal/client/ui/core
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-26 09:42:59 +0200
committerKyren223 <Kyren223@proton.me>2024-11-26 09:42:59 +0200
commit89655bea2a159f2004c75e3a7d0e812f46e2b276 (patch)
treed050080865482ea8e92e6abab3ff946c54cfaf54 /internal/client/ui/core
parentb05e4fcbcb59bdf20ca7b3e27f8ed15fea594cad (diff)
Added color indicator
Diffstat (limited to 'internal/client/ui/core')
-rw-r--r--internal/client/ui/core/networkcreation/networkcreation.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/client/ui/core/networkcreation/networkcreation.go b/internal/client/ui/core/networkcreation/networkcreation.go
index f21bb73..f01caa8 100644
--- a/internal/client/ui/core/networkcreation/networkcreation.go
+++ b/internal/client/ui/core/networkcreation/networkcreation.go
@@ -148,7 +148,12 @@ func (m Model) View() string {
color = colors.Focus
}
colorInput := underlineStyle(m.color.View(), MaxHexDigits, color)
- colorText := lipgloss.JoinHorizontal(lipgloss.Top, colorHeader, colorInput)
+ indicatorColor := colors.Background
+ if len(m.color.Value()) == 6 {
+ indicatorColor = lipgloss.Color("#" + m.color.Value())
+ }
+ colorIndicator := lipgloss.NewStyle().Foreground(indicatorColor).Render(" ■")
+ colorText := lipgloss.JoinHorizontal(lipgloss.Top, colorHeader, colorInput, colorIndicator)
icon := lipgloss.JoinHorizontal(lipgloss.Top, iconText, colorText)