diff options
author | Jordan Bracco <href@random.sh> | 2023-01-15 17:25:25 +0100 |
---|---|---|
committer | Jordan Bracco <href@random.sh> | 2023-01-15 17:32:46 +0100 |
commit | cc80d8c82c2d510ab14e9dd58316cf748c653b08 (patch) | |
tree | 76c41e3aa7c765c00bbfe71f5a447030831413b1 /window.go | |
parent | feat(ui): improve /TOPIC ui (diff) |
Multi-WIP that I probably should have done in multiples commits:
- more colors settings:
- server foreground
- channel foreground (active, inactive)
- dumb cosmetic changes because why not (`!` -> `:(`, coloring)
- temporary lines to unclutter main ui from disconnections/reconnections
- display line head only once in case of multiple lines
- cosmetic motd
- handle 396 numeric as "server" head
- improved ACTION display
- imrpoved topic display
bugs:
- ACTION fucks up with multi-line head
- multi-line head needs rework before trying upstream
- what the fuck to with my cosmetic changes
- document new config values
Diffstat (limited to 'window.go')
-rw-r--r-- | window.go | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -44,6 +44,16 @@ func (app *App) addStatusLine(netID string, line ui.Line) { app.win.AddLine(netID, "", line) } +func (app *App) addTemporaryStatusLine(netID string, line ui.Line) { + currentNetID, buffer := app.win.CurrentBuffer() + if currentNetID == netID && buffer != "" { + currentLine := line + currentLine.Temporary = true + app.win.AddLine(netID, buffer, currentLine) + } + app.win.AddLine(netID, "", line) +} + func (app *App) setStatus() { netID, buffer := app.win.CurrentBuffer() s := app.sessions[netID] @@ -53,11 +63,11 @@ func (app *App) setStatus() { ts := s.Typings(buffer) status := "" if 3 < len(ts) { - status = "several people are typing..." + status = "several people are typing…" } else { - verb := " is typing..." + verb := " is typing…" if 1 < len(ts) { - verb = " are typing..." + verb = " are typing…" status = strings.Join(ts[:len(ts)-1], ", ") + " and " } if 0 < len(ts) { |