Commit graph

10 commits

Author SHA1 Message Date
342ecde6bb refactor: update reconnect code for better understanding 2024-11-21 12:28:36 +01:00
05e8bf5854 feat: reconnect on disconnect (add status to TUI)
- add `Connected()` method for client
- add `LastErr` field to GoTomatoClient
  - replace error logging by updating `LastErr` field
  - modify methods to use pointer receivers for Client
- add `prevMessage` variable to store the last received server message
- show connect status in TUI
- use EnterAltScreen instead of ClearScreen
2024-11-10 09:34:55 +01:00
561419b568 feat: implement centralized logging helper
- remove direct log usage
- create a new logging helper
- update all log calls to use the new Logger instance
- set timestamp to ISO8601

🤖
2024-11-04 20:39:21 +01:00
8a0ef32c91 feat: use bubbletea framework
- implement TUI in bubbletea
  - split components into separate files
- remove now unused functions
- restructure files
2024-11-02 10:55:15 +01:00
f19ab81dc8 doc: add and improve comments 2024-10-30 17:44:52 +01:00
6187122b81 feat: refactor client methods
- change `ProcessServerMessages` to use receiver instead of parameter
- update `Disconnect` method to use receiver for better encapsulation
- move `Client` definition to `connect.go`

🤖
2024-10-30 09:51:59 +01:00
0ca90b50a5 feat: refactor client handling and introduce websocket client type
- add new websocket.Client type
- change Connect and Disconnect functions to use the new Client type
- implement methods for sending commands and updating settings on Client
- update keyhandler to use websocket.Client instead of ChronoTomato.Client
- modify UpdateLoop to accept websocket.Client
- refactor ProcessServerMessages to accept the new Client type

🤖
2024-10-30 08:57:10 +01:00
b943c9d6eb feat: refactor connection handling to use models.Client
- introduce `Client` model
- modify all websocket operations to use the new `Client` model
- update function signatures to accept `models.Client` instead of `*websocket.Conn`
- ensure consistent usage of `client` across all related functions

🤖
2024-10-30 08:28:22 +01:00
e14492a01c feat: refactor signal handling and update websocket disconnect handling
- remove os signal handling interrupt
- rename WaitForDisconnect to Disconnect function
- improve websocket disconnection logic
- exit keyboard listener on disconnect

🤖
2024-10-23 21:21:23 +02:00
11c599a371 Genesis 2024-10-23 17:43:44 +02:00