Commit graph

18 commits

Author SHA1 Message Date
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
b06fac60d5 fix: rename model PomodoroClient to GoTomatoClient 2024-10-30 09:03:14 +01:00
b374ee8aff feat: add Password field to PomodoroClient struct
remove unused password parameters from Client-Methods

🤖
2024-10-30 09:00:29 +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
0f8fde3143 fix: update GoTomato model field names
adjust field names due to breaking changes in GoTomato v0.0.4
2024-10-28 07:56:37 +01:00
e8b463c59c format: update import statements
- clean up and streamline import statements across multiple files

🤖
2024-10-27 22:33:36 +01:00
912dfa62f2 format: improve code structure for better readability
🤖
2024-10-27 22:33:36 +01:00
34d4206f65 fix: use websocket constant to check IsCloseError 2024-10-27 22:33:36 +01:00
4f9bd664a3 fix: remove ununsed return statements in keyhandler() 2024-10-27 22:33:36 +01:00
bbc9977f1c feat: refactor shared.Message to a channel
- remove `shared` package and shared.Message
- rename `notifications` package to `frontend`
- introduce a channel send the received ServerMessages to the frontend handler(s)
- move keyhandler to goroutine
- simplify password handling in Start function
- update import names when importing from GoTomoto
2024-10-27 22:33:30 +01:00
6857615585 fix: no error on normal websocket closure
- ignore error for normal closure
- log any other errors encountered during message processing
- reorder import statements

🤖
2024-10-24 07:25:48 +02: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
064056e8cb feat: update module path
- modify go.mod to reflect the new module path
- update config file path in the main function
- adjust import statements in various internal packages
- add install instructions to README

🤖
2024-10-23 21:21:23 +02:00
bb790459c1 feat: add configuration file handling
- add helper function to parse configuration from a YAML file
- update command-line parameters to include a config file option
- remove hardcoded Pomodoro settings and use parsed config instead
- delete obsolete PomodoroSettings.go file

🤖
2024-10-23 17:45:56 +02:00
a61da7d280 chore: reorder parameters in SendCmd function
🤖
2024-10-23 17:45:18 +02:00
4dcc984784 feat: add keyboard controls
- add keyboard listener for space, r, and q keys
- create shared state for server messages
- update desktop and terminal notifications to use shared state

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