mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-30 03:00:57 +00:00
feat: show optional time worked without break
This commit is contained in:
parent
49f4bde59d
commit
d43150d5cc
6 changed files with 54 additions and 10 deletions
|
|
@ -160,6 +160,7 @@
|
|||
isPlaySound: true,
|
||||
isGoToWorkView: false,
|
||||
},
|
||||
isShowTimeWorkedWithoutBreak: false,
|
||||
isTakeABreakEnabled: false,
|
||||
takeABreakMinWorkingTime: undefined,
|
||||
isAutoStartNextTask: true,
|
||||
|
|
|
|||
|
|
@ -65,11 +65,14 @@
|
|||
current: this.$rootScope.r.currentTask,
|
||||
lastActiveTask: this.Tasks.getLastActiveIfStartable()
|
||||
});
|
||||
}
|
||||
|
||||
if (this.IS_ELECTRON || this.IS_EXTENSION) {
|
||||
if (!this.isIdle) {
|
||||
this.TakeABreakReminder.update(realPeriodDuration, this.isIdle);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// reset currentTrackingStart
|
||||
currentTrackingStart = moment();
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@
|
|||
ng-model="vm.settings.minIdleTime">
|
||||
</md-input-container>
|
||||
|
||||
<md-switch ng-model="vm.settings.isShowTimeWorkedWithoutBreak"
|
||||
aria-label="Show time worked without break in work view">
|
||||
Show time worked without break in work view
|
||||
</md-switch>
|
||||
|
||||
<md-switch ng-model="vm.settings.isTakeABreakEnabled"
|
||||
aria-label="Enable take a break reminder">
|
||||
Enable take a break reminder
|
||||
|
|
|
|||
|
|
@ -14,4 +14,21 @@ work-view {
|
|||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
margin-top: -4px;
|
||||
padding: 10px 0;
|
||||
|
||||
.item {
|
||||
margin: 0 12px;
|
||||
}
|
||||
.no-wrap {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +1,34 @@
|
|||
<header class="work-view-header">
|
||||
<p>
|
||||
<ng-md-icon icon="playlist_play"></ng-md-icon>
|
||||
<span class="label">Working today:</span>
|
||||
<strong ng-bind="vm.totalTimeWorkedToday|duration"></strong>
|
||||
<ng-md-icon icon="timer"></ng-md-icon>
|
||||
–
|
||||
<span class="label">Estimate remaining:</span> ~<strong ng-bind="vm.totalEstimationRemaining|duration"></strong>
|
||||
<ng-md-icon icon="timer"></ng-md-icon>
|
||||
<div class="status-bar">
|
||||
<div class="item"><span class="label">Working today:</span>
|
||||
<span class="no-wrap">
|
||||
<strong ng-bind="vm.totalTimeWorkedToday|duration"></strong>
|
||||
<ng-md-icon icon="timer"></ng-md-icon>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span class="label">Estimate remaining:</span>
|
||||
<span class="no-wrap">
|
||||
~<strong ng-bind="vm.totalEstimationRemaining|duration"></strong>
|
||||
<ng-md-icon icon="timer"></ng-md-icon>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="item"
|
||||
ng-if="vm.config.isShowTimeWorkedWithoutBreak">
|
||||
<span class="label">Without break: </span>
|
||||
<span class="no-wrap">
|
||||
<strong ng-bind="vm.session.timeWorkedWithoutBreak|duration"></strong><ng-md-icon icon="timer"></ng-md-icon>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<md-button ng-click="vm.collapseAllNotesAndSubTasks()"
|
||||
class="md-icon-button md-primary">
|
||||
<ng-md-icon icon="vertical_align_center" aria-label="collapse sub tasks and notes"></ng-md-icon>
|
||||
<ng-md-icon icon="vertical_align_center"
|
||||
aria-label="collapse sub tasks and notes"></ng-md-icon>
|
||||
</md-button>
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="work-view-tasks work-view-tasks--undone">
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
const _ = $window._;
|
||||
|
||||
// INIT
|
||||
vm.session = $rootScope.r.currentSession;
|
||||
vm.config = $rootScope.r.config;
|
||||
vm.tasksUndone = Tasks.getUndoneToday();
|
||||
vm.tasksDone = Tasks.getDoneToday();
|
||||
updateTimeTotals();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue