mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-29 10:40:12 +00:00
feat(pomodoro): go to work view when starting session #32
This commit is contained in:
parent
67e301ac6c
commit
76cfd2ba12
3 changed files with 13 additions and 1 deletions
|
|
@ -127,6 +127,7 @@
|
|||
isStopTrackingOnLongBreak: true,
|
||||
isShowDistractionsOnBreak: true,
|
||||
isPlaySound: true,
|
||||
isGoToWorkView: true,
|
||||
},
|
||||
isTakeABreakEnabled: false,
|
||||
takeABreakMinWorkingTime: undefined,
|
||||
|
|
|
|||
|
|
@ -18,12 +18,13 @@
|
|||
|
||||
class PomodoroButton {
|
||||
/* @ngInject */
|
||||
constructor($rootScope, $interval, $q, Dialogs, Tasks, SimpleToast, LS_DEFAULTS, EV, IS_ELECTRON, Notifier) {
|
||||
constructor($rootScope, $interval, $q, Dialogs, Tasks, SimpleToast, LS_DEFAULTS, EV, IS_ELECTRON, Notifier, $state) {
|
||||
this.LS_DEFAULTS = LS_DEFAULTS;
|
||||
this.IS_ELECTRON = IS_ELECTRON;
|
||||
this.EV = EV;
|
||||
this.$rootScope = $rootScope;
|
||||
this.$interval = $interval;
|
||||
this.$state = $state;
|
||||
this.$q = $q;
|
||||
this.Dialogs = Dialogs;
|
||||
this.SimpleToast = SimpleToast;
|
||||
|
|
@ -102,6 +103,10 @@
|
|||
this.selectTask()
|
||||
.then(() => {
|
||||
this.start();
|
||||
|
||||
if (this.config.isGoToWorkView) {
|
||||
this.$state.go('work-view');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,6 +110,12 @@
|
|||
ng-model="vm.settings.pomodoro.cyclesBeforeLongerBreak">
|
||||
</md-input-container>
|
||||
|
||||
<div>
|
||||
<md-switch ng-model="vm.settings.pomodoro.isGoToWorkView"
|
||||
aria-label="Go to work view when starting a session">
|
||||
Go to work view when starting a session
|
||||
</md-switch>
|
||||
</div>
|
||||
<div>
|
||||
<md-switch ng-model="vm.settings.pomodoro.isStopTrackingOnBreak"
|
||||
aria-label="Pause time tracking on pomodoro break">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue