mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-08-01 04:01:01 +00:00
feat(pomodoro): add option to play sound when break ends #138
This commit is contained in:
parent
7dd7037dc3
commit
6ca5db2cab
4 changed files with 10 additions and 1 deletions
|
|
@ -54,6 +54,7 @@ export type PomodoroConfig = Readonly<{
|
|||
isStopTrackingOnLongBreak: boolean;
|
||||
isManualContinue: boolean;
|
||||
isPlaySound: boolean;
|
||||
isPlaySoundAfterBreak: boolean;
|
||||
// isGoToWorkView: boolean;
|
||||
isPlayTick: boolean;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export const DEFAULT_CFG: GlobalConfig = {
|
|||
isStopTrackingOnLongBreak: true,
|
||||
isManualContinue: false,
|
||||
isPlaySound: true,
|
||||
isPlaySoundAfterBreak: false,
|
||||
// isGoToWorkView: false,
|
||||
isPlayTick: false,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -46,6 +46,13 @@ export const POMODORO_FORM_CFG: ConfigFormSection = {
|
|||
label: 'Play sound when session is done',
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'isPlaySoundAfterBreak',
|
||||
type: 'checkbox',
|
||||
templateOptions: {
|
||||
label: 'Play sound when break is done',
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'isPlayTick',
|
||||
type: 'checkbox',
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ export class PomodoroEffects {
|
|||
),
|
||||
filter(isEnabled),
|
||||
filter(([action, cfg, isBreak]: [FinishPomodoroSession, PomodoroConfig, boolean]) =>
|
||||
cfg.isPlaySound && isBreak),
|
||||
(cfg.isPlaySound && isBreak) || (cfg.isPlaySoundAfterBreak && !isBreak)),
|
||||
tap(() => this._pomodoroService.playSessionDoneSound()),
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue