Skip to content

Commit

Permalink
feat(pomodoro): add skip break button
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Jan 9, 2018
1 parent bbf188f commit 5bd2935
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app-src/scripts/pomodoro-button/pomodoro-button-cp.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
aria-label="Stop Pomodoro Session">
<ng-md-icon icon="stop"></ng-md-icon>
</md-button>
<md-button ng-if="$ctrl.svc.data.isOnBreak"
class="md-fab md-raised md-mini"
ng-click="$ctrl.skipBreak($event)"
aria-label="Stop Pomodoro Session">
<ng-md-icon icon="skip_next"></ng-md-icon>
</md-button>
</md-fab-actions>
</md-fab-speed-dial>

6 changes: 6 additions & 0 deletions app-src/scripts/pomodoro-button/pomodoro-button-cp.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
this.svc.toggle();
this.isOpen = false;
}

skipBreak($ev) {
$ev.preventDefault();
$ev.stopPropagation();
this.svc.skipBreak();
}
}

angular
Expand Down

0 comments on commit 5bd2935

Please sign in to comment.