break: update terminology from "Work" to "Focus"
- change mode from "Work" to "Focus" in server messages
- modify pomodoro configuration to use "Focus" instead of "Work"
- adjust default settings to reflect new terminology
- ensure all references to work duration are updated to focus duration
- update variable names in HTML and JavaScript for clarity
🤖
This commit is contained in:
parent
b3f403cf1a
commit
31179d4af4
9 changed files with 34 additions and 34 deletions
|
@ -4,7 +4,7 @@ import "fmt"
|
|||
|
||||
// Represents the configuration of a pomodoro
|
||||
type PomodoroConfig struct {
|
||||
Work int `json:"work"` // Length of work sessions in seconds
|
||||
Focus int `json:"focus"` // Length of focus sessions in seconds
|
||||
ShortBreak int `json:"shortBreak"` // Length of short break in seconds
|
||||
LongBreak int `json:"longBreak"` // Length of long break in seconds
|
||||
Sessions int `json:"sessions"` // Number of total sessions
|
||||
|
@ -12,7 +12,7 @@ type PomodoroConfig struct {
|
|||
|
||||
// Stringer interface for the PomodocoConfig model
|
||||
func (c PomodoroConfig) String() string {
|
||||
return fmt.Sprintf("{work: %d, short: %d, long: %d, sessions: %d}", c.Work, c.ShortBreak, c.LongBreak, c.Sessions)
|
||||
return fmt.Sprintf("{focus: %d, short: %d, long: %d, sessions: %d}", c.Focus, c.ShortBreak, c.LongBreak, c.Sessions)
|
||||
}
|
||||
|
||||
// Represents the server configuration
|
||||
|
|
|
@ -2,7 +2,7 @@ package models
|
|||
|
||||
// Represents the data sent to the client via WebSocket
|
||||
type ServerMessage struct {
|
||||
Mode string `json:"mode"` // "Idle", "Work", "ShortBreak", "LongBreak" or "End"
|
||||
Mode string `json:"mode"` // "Idle", "Focus", "ShortBreak", "LongBreak" or "End"
|
||||
Settings PomodoroConfig `json:"settings"` // The currrent pomodoro settings
|
||||
Session int `json:"session"` // Current session number
|
||||
TimeLeft int `json:"time_left"` // Remaining time in seconds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue