diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-04 12:12:13 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-07 16:02:18 -0500 |
| commit | b0fd9a1c7848343ef378b772eb76a0e99747260c (patch) | |
| tree | 05093ccc0bda8ba4f1286b738ab67a6b1bccfd61 /client/ui.go | |
| parent | 035344054768562bee7db12e02e3bec1c8409210 (diff) | |
channel list
Diffstat (limited to 'client/ui.go')
| -rw-r--r-- | client/ui.go | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/client/ui.go b/client/ui.go index 014c7e9..87edea8 100644 --- a/client/ui.go +++ b/client/ui.go @@ -67,6 +67,10 @@ func (a *application) onInput(ev tui.Event) { input.SetText("") } } + case keys.Up | keys.Alt: + a.channelList.traverse(-1) + case keys.Down | keys.Alt: + a.channelList.traverse(1) case 'p' | keys.Ctrl: a.traverseHistory(-1) case 'n' | keys.Ctrl: @@ -106,13 +110,8 @@ func (a *application) showNickBox() { tui.Pop() } -func (a *application) show() { - tui.Clear() - s := tui.Size() - tui.Push("", tui.Box { - Width: tui.BoxSize(s.Width), Height: tui.BoxSize(s.Height), - Style: &tui.Style {Fg: tui.White, Bg: colorDefault[false]}, - }) +func (a *application) showWindow() { + tui.Push("window", tui.Box {Width: tui.Fill, Height: tui.Fill}) if a.currentWindow != (cmdWindowLocation{}) { a.cmdWindow.showPreview() @@ -153,6 +152,22 @@ func (a *application) show() { tui.Pop() tui.Pop() +} + +func (a *application) show() { + tui.Clear() + s := tui.Size() + tui.Push("", tui.Box { + Width: tui.BoxSize(s.Width), Height: tui.BoxSize(s.Height), + Dir: tui.Right, + }) + + a.channelList.show() + tui.Push("border", tui.Box {Width: 1, Height: tui.Fill}) + tui.Text(strings.Repeat("│", s.Height), nil) + tui.Pop() + a.showWindow() + tui.DrawLayout() if tui.Present() != nil { os.Exit(-1) |
