Commit graph

57 commits

Author SHA1 Message Date
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
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