diff --git a/src/lib/components/app/daemon.svelte b/src/lib/components/app/daemon.svelte index bcae5fc..e60dd27 100644 --- a/src/lib/components/app/daemon.svelte +++ b/src/lib/components/app/daemon.svelte @@ -6,6 +6,7 @@ import Window from '../ui/window/window.svelte'; import TodoList from './todo-list.svelte'; import Twentytwentytwenty from './twentytwentytwenty.svelte'; + import Pomodoro from './pomodoro.svelte'; // svelte-ignore non_reactive_update let audioElement: HTMLAudioElement; @@ -260,4 +261,16 @@ show={appState.show202020} > + + + appState.showPomodoro = false} + show={appState.showPomodoro} +> + \ No newline at end of file diff --git a/src/lib/components/app/left-bar.svelte b/src/lib/components/app/left-bar.svelte index a22f551..cac04fb 100644 --- a/src/lib/components/app/left-bar.svelte +++ b/src/lib/components/app/left-bar.svelte @@ -3,6 +3,7 @@ import Check from '@lucide/svelte/icons/check'; import Button from '../ui/button/button.svelte'; import Binoculars from '@lucide/svelte/icons/binoculars'; + import Clock from '@lucide/svelte/icons/clock';
+
diff --git a/src/lib/components/app/pomodoro.svelte b/src/lib/components/app/pomodoro.svelte new file mode 100644 index 0000000..30e2feb --- /dev/null +++ b/src/lib/components/app/pomodoro.svelte @@ -0,0 +1,130 @@ + + + + + + +
+
+
+ {appState.pomodoroWorkPhase ? 'Work Time' : 'Break Time'} +
+
+ {minutes.toString().padStart(2, '0')}:{seconds.toString().padStart(2, '0')} +
+
+ +
+ {#if appState.isPomodoroActive} + + {:else} + + {/if} +
+
diff --git a/src/lib/state.svelte.ts b/src/lib/state.svelte.ts index b239225..34ed7ad 100644 --- a/src/lib/state.svelte.ts +++ b/src/lib/state.svelte.ts @@ -31,6 +31,12 @@ export const state = $state({ workRuleTimer: 20 * 60, restRuleTimer: 20, + showPomodoro: false, + pomodoroTimer: 25 * 60, + pomodoroBreakTimer: 5 * 60, + isPomodoroActive: false, + pomodoroWorkPhase: true, + // in daemon.svelte togglePlay: (() => {}) as () => void, });