diff --git a/changelog.md b/changelog.md index 2ccad85..454e5b4 100644 --- a/changelog.md +++ b/changelog.md @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Security +## [0.2.1] - 2024-05-31 + +### Fixed + +- Messages wrap properly with terminal viewport width + ## [0.2.0] - 2024-05-31 ### Added @@ -59,7 +65,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Go programs for [client](./tui/main.go) and [server](./server/main.go) - GitHub Actions release flow, including binaries -[unreleased]: https://github.com/supleed2/go-chat/compare/v0.2.0...HEAD +[unreleased]: https://github.com/supleed2/go-chat/compare/v0.2.1...HEAD +[0.2.1]: https://github.com/supleed2/go-chat/releases/tag/v0.2.1 [0.2.0]: https://github.com/supleed2/go-chat/releases/tag/v0.2.0 [0.1.2]: https://github.com/supleed2/go-chat/releases/tag/v0.1.2 [0.1.1]: https://github.com/supleed2/go-chat/releases/tag/v0.1.1 diff --git a/client/main.go b/client/main.go index 1057d30..961a3fd 100644 --- a/client/main.go +++ b/client/main.go @@ -74,7 +74,7 @@ type args struct { } func (a *args) Version() string { - return "v0.1.2" + return "v0.2.1" } func (a *args) Description() string { return "Go, chat!\nA basic irc-style chat client, written in Go using bubbletea and websockets" @@ -181,7 +181,7 @@ func initModel(ctx context.Context, conn *ws.Conn, a args, tz time.Location) mod showTim: a.Timestamps, tz: tz, history: vp, - idStyle: lipgloss.NewStyle().Width(30), + idStyle: lipgloss.NewStyle(), pStyle: lipgloss.NewStyle().Bold(true), help: help.New(), recvCh: recvCh, @@ -250,7 +250,6 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.history.Width = msg.Width m.history.GotoBottom() m.input.Width = msg.Width - 3 - m.idStyle.Width(msg.Width) m.help.Width = msg.Width - 1 m.history.SetContent(m.viewMessages()) } diff --git a/server/main.go b/server/main.go index 2551a6a..5803f44 100644 --- a/server/main.go +++ b/server/main.go @@ -63,7 +63,7 @@ const createRoomTable = "CREATE TABLE IF NOT EXISTS %s (tim DATETIME, id TEXT, m const insertRoomMsg = "INSERT INTO %v (tim, id, msg) VALUES (:tim, :id, :msg)" func (a *args) Version() string { - return "v0.1.2" + return "v0.2.1" } func (a *args) Description() string {