feat(night-light): optional auto-on schedule (time window)
Night Light was all-or-nothing. Add an optional schedule with From/To time inputs so the warm overlay only shows during set hours and toggles itself on/off automatically (the overlay re-checks every minute; no reload). Overnight windows that wrap midnight (e.g. 21:00 -> 07:00) are handled. Window logic is the pure, unit-tested isWithinTimeWindow/parseHHMM in utils/timeWindow.ts. New settings: nightLightSchedule/Start/End (default 21:00-07:00). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -220,6 +220,9 @@ export interface Settings {
|
||||
|
||||
nightLightEnabled: boolean;
|
||||
nightLightOpacity: number;
|
||||
nightLightSchedule: boolean;
|
||||
nightLightStart: string;
|
||||
nightLightEnd: string;
|
||||
|
||||
glassmorphismSidebar: boolean;
|
||||
|
||||
@@ -329,6 +332,9 @@ const defaultSettings: Settings = {
|
||||
pttMode: false,
|
||||
pttKey: 'Space',
|
||||
|
||||
nightLightSchedule: false,
|
||||
nightLightStart: '21:00',
|
||||
nightLightEnd: '07:00',
|
||||
nightLightEnabled: false,
|
||||
nightLightOpacity: 30,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user