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

🤖
This commit is contained in:
Sebastian Mark 2024-10-20 10:02:00 +02:00
parent bc3a306c00
commit ffc6913344
4 changed files with 28 additions and 12 deletions

View file

@ -34,7 +34,7 @@ func handleClientCommands(ws *websocket.Conn) {
}
case "stop":
if pomodoro.IsPomodoroRunning() {
pomodoro.StopPomodoro() // Stop the timer in the Pomodoro package
pomodoro.ResetPomodoro(Clients) // Reset Pomodoro
}
case "pause":
if pomodoro.IsPomodoroRunning() && !pomodoro.IsPomodoroPaused() {