2024-10-19 09:47:56 +00:00
|
|
|
package models
|
|
|
|
|
2024-10-20 19:59:18 +00:00
|
|
|
// ServerMessage represents the data sent to the client via WebSocket.
|
|
|
|
type ServerMessage struct {
|
2024-10-22 05:46:46 +00:00
|
|
|
Mode string `json:"mode"` // "Idle", "Work", "ShortBreak", "LongBreak" or "End"
|
|
|
|
PomodoroSettings GoTomatoPomodoroConfig `json:"settings"` // The currrent pomodoro settings
|
|
|
|
Session int `json:"session"` // Current session number
|
|
|
|
TimeLeft int `json:"time_left"` // Remaining time in seconds
|
|
|
|
Ongoing bool `json:"ongoing"` // Ongoing pomodoro
|
|
|
|
Paused bool `json:"paused"` // Is timer paused
|
2024-10-22 15:18:05 +00:00
|
|
|
GoTomatoVersion string `json:"version"` // Version of the server
|
2024-10-19 09:47:56 +00:00
|
|
|
}
|