feat: allow clients to send pomodoro config
- allow clients to send custom configuration for pomodoro sessions
- update RunPomodoro to accept a configuration parameter
- modify startTimer to handle session count from config
- add default pomodoro configuration in client command handling
🤖
This commit is contained in:
parent
9149b1a78e
commit
2ac1aecba1
6 changed files with 46 additions and 22 deletions
|
@ -61,7 +61,8 @@
|
|||
|
||||
// Start Button Click Event
|
||||
document.getElementById("startButton").addEventListener("click", function () {
|
||||
ws.send(JSON.stringify({command: "start"}));
|
||||
// ws.send(JSON.stringify({command: "start"}));
|
||||
ws.send(JSON.stringify({command: "start", config: {work: 10, shortBreak: 5, longBreak: 10, sessions: 2}}));
|
||||
|
||||
// Hide start button and show pause/resume and stop buttons
|
||||
document.getElementById("startButton").style.display = "none";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue