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:
parent
bc3a306c00
commit
ffc6913344
4 changed files with 28 additions and 12 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue