diff --git a/README.md b/README.md index 82d7981..fdc0687 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,12 @@ dv.table( | --pomodoro-timer-text-color | var(--text-normal) | | --pomodoro-timer-dot-color | var(--color-ted) | +## FAQ + +1. How to Switch the Session + +To switch sessions, simply click on the `Work/Break` label displayed on the timer. + --- [BuyMeACoffee](https://www.buymeacoffee.com/eatgrass) diff --git a/src/StatusBarComponent.svelte b/src/StatusBarComponent.svelte index 4255edf..f6b84ff 100644 --- a/src/StatusBarComponent.svelte +++ b/src/StatusBarComponent.svelte @@ -41,7 +41,6 @@ const ctxMenu = (e: MouseEvent) => { menu.addItem((item) => { const mode = `Switch ${$store.mode === 'WORK' ? 'Break' : 'Work'} ` item.setTitle(mode) - item.setDisabled($store.running || $store.inSession) item.onClick(() => { store.toggleMode() }) diff --git a/src/Timer.ts b/src/Timer.ts index a21c83c..0d9a239 100644 --- a/src/Timer.ts +++ b/src/Timer.ts @@ -295,9 +295,6 @@ export default class Timer implements Readable { public toggleMode(callback?: (state: TimerState) => void) { this.update((s) => { - if (s.inSession) { - return s - } let updated = this.endSession(s) if (callback) { callback(updated) diff --git a/src/TimerViewComponent.svelte b/src/TimerViewComponent.svelte index b9b8c6e..c6160e8 100644 --- a/src/TimerViewComponent.svelte +++ b/src/TimerViewComponent.svelte @@ -55,7 +55,7 @@ const toggleExtra = (value: 'settings' | 'tasks') => {
{#if $timer.running}{/if}