diff options
| author | Kyren223 <Kyren223@proton.me> | 2024-11-26 09:42:59 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2024-11-26 09:42:59 +0200 |
| commit | 89655bea2a159f2004c75e3a7d0e812f46e2b276 (patch) | |
| tree | d050080865482ea8e92e6abab3ff946c54cfaf54 /internal/client/ui/core/networkcreation | |
| parent | b05e4fcbcb59bdf20ca7b3e27f8ed15fea594cad (diff) | |
Added color indicator
Diffstat (limited to 'internal/client/ui/core/networkcreation')
| -rw-r--r-- | internal/client/ui/core/networkcreation/networkcreation.go | 7 |
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) |
