Commit graph

120 commits

Author SHA1 Message Date
d0e1162726 feat: add comments for configuration fields
- add documentation comments for
  - GoTomatoTimerConfig
  - GoTomatoServerConfig

🤖
2024-10-20 20:49:36 +02:00
45c527cc79 fix: remove default values from GoTomatoServerConfig model 2024-10-20 20:09:34 +02:00
914421d7a5 doc: update README with client commands and server messages
- add table of contents for better navigation
- document client commands with JSON examples
- describe server messages and their structure

🤖
2024-10-20 19:26:14 +02:00
b46d2469d3 feat: update variable and function name for started pomodoro
- change variable name from pomodoroRunning to pomodoroOngoing
- update function name from IsPomodoroRunning to IsPomodoroOngoing
- modify client command checks to use IsPomodoroActive instead of IsPomodoroRunning

🤖
2024-10-20 18:16:38 +02:00
b71d04aad2 fix: remove duplicate client registration
- delete the client creation logic from handleClientCommands
2024-10-20 17:38:45 +02:00
0b2f83cd35 feat: add CLI flags to app
- implement command-line flags for listen address and port
- add usage section to README

🤖
2024-10-20 14:55:02 +02:00
85923b4469 feat: create model for pomodoro settings
- introduce GoTomatoTimerConfig
- create instance variable with current config
- update code to use the new variable
2024-10-20 14:45:18 +02:00
09b475dd61 feat: create model for server config
- introduce GoTomatoServerConfig
- create instance variable with the current config
- update server to use configurable listen address and port

🤖
2024-10-20 14:45:13 +02:00
3d5cb29c54 chore: cleanup pause/resume functions 2024-10-20 11:28:28 +02:00
b62e92b5a4 fix: resolve race condition in pause/resume check
- replace direct check of pomodoroPaused with IsPomodoroPaused function
2024-10-20 11:28:26 +02:00
4471c86a0c fix: prevent concurrent write to websocket connection
- refactor client handling and message broadcasting
- replace Client struct
- implement SendMessage method in Client struct for safer message sending
- update client map to use *models.Client instead of bool
- adjust BroadcastMessage and RunPomodoroTimer functions to use new client type

🤖
2024-10-20 11:06:37 +02:00
ffc6913344 break: change the "stop" command to "reset"
- change stop channel to reset channel
- create ResetPomodoro function
- broadcast reset message to all clients
- rename stop button to reset button in index.html

🤖
2024-10-20 10:03:29 +02:00
bc3a306c00 feat: add pause and resume functionality
- implement pause and resume commands in the Pomodoro package
- modify timer logic to handle paused state
- adjust client command handling for pause and resume actions
- update HTML to include pause/resume button

🤖
2024-10-20 10:03:22 +02:00
c9501c3bbb feat: update timer management
- rename timerRunning to pomodoroRunning
- move function and timer definition to correct source file

🤖
2024-10-19 18:08:54 +02:00
90f80cc685 feat: add Dockerfile for GoTomato
🤖
2024-10-19 17:13:15 +02:00
b7a79acdb0 feat: (re)add GoTomato.go
- refactor server package
  - update package name
  - rename `StartServer()` to `Start()`
- (re)add `GoTomato.go` to call `server.Start()`
- update README
2024-10-19 16:49:09 +02:00
c59f737eb7 feat(server): restructure Pomodoro server into modular components
- move server logic to cmd/server/main.go
- create packages for websocket, pomodoro and broadcast handling
- define models for messages
- remove old GoTomato.go file
- update README

🤖
2024-10-19 16:49:09 +02:00
6d73711341 feat: implement client start/stop commands
- add ClientCommand struct to handle incoming commands
- introduce timerStopChannel to manage timer stopping
- modify startTimer to return a boolean for success/failure
- update runPomodoroTimer to handle timer start/stop commands
- add start and stop buttons in the index.html for user interaction

🤖
2024-10-19 16:49:09 +02:00
fa4eebbe76 feat: update module path to new repository location
- change module path from GoTomato to git.smsvc.net/pomodoro/GoTomato

🤖
2024-10-19 16:49:09 +02:00
2cf5d77e2a Genesis 2024-10-19 16:49:09 +02:00