diff options
| -rw-r--r-- | internal/client/ui/core/networklist/networklist.go | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/internal/client/ui/core/networklist/networklist.go b/internal/client/ui/core/networklist/networklist.go index 2e6b970..16afda1 100644 --- a/internal/client/ui/core/networklist/networklist.go +++ b/internal/client/ui/core/networklist/networklist.go @@ -12,16 +12,6 @@ import ( "github.com/kyren223/eko/internal/packet" ) -var ( - sepStyle = lipgloss.NewStyle().Width(0).BorderBackground(colors.BackgroundDimmer). - Border(lipgloss.ThickBorder(), false, true, false, false) - - selectedIndicator = "š\nā\nš" - notification = " \nā\n " - - backgroundStyle = lipgloss.NewStyle().Background(colors.BackgroundDimmer) -) - const SignalsIndex = -1 type Model struct { @@ -45,6 +35,12 @@ func (m Model) Init() tea.Cmd { } func (m Model) View() string { + selectedIndicator := lipgloss.NewStyle(). + Foreground(colors.White).Render("š\nā\nš") + + notification := lipgloss.NewStyle(). + Foreground(colors.White).Render(" \nā\n ") + var builder strings.Builder pings := 0 @@ -123,13 +119,16 @@ func (m Model) View() string { result := builder.String() - sep := sepStyle.Height(ui.Height) + sep := lipgloss.NewStyle().Width(0).Height(ui.Height). + BorderBackground(colors.BackgroundDimmer).BorderForeground(colors.White). + Border(lipgloss.ThickBorder(), false, true, false, false) if m.focus { sep = sep.BorderForeground(colors.Focus) } + result = lipgloss.JoinHorizontal(lipgloss.Top, result, sep.String()) - return backgroundStyle.Render(result) + return lipgloss.NewStyle().Background(colors.BackgroundDimmer).Render(result) } func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) { |
