From da97c4cee0764d8ee61ed7eed4c165de46c09bf2 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Sun, 4 Mar 2018 17:06:11 +0100 Subject: [PATCH] feat(focusMode): add ui for component --- .../pomodoro-focus/_pomodoro-focus-c.scss | 57 +++++++- .../pomodoro-focus/pomodoro-focus-c.html | 131 ++++++++++++++---- .../pomodoro-focus/pomodoro-focus-c.js | 8 +- 3 files changed, 164 insertions(+), 32 deletions(-) diff --git a/app-src/scripts/dialogs/pomodoro-focus/_pomodoro-focus-c.scss b/app-src/scripts/dialogs/pomodoro-focus/_pomodoro-focus-c.scss index 660a4c951e..f60cafde09 100644 --- a/app-src/scripts/dialogs/pomodoro-focus/_pomodoro-focus-c.scss +++ b/app-src/scripts/dialogs/pomodoro-focus/_pomodoro-focus-c.scss @@ -1,14 +1,67 @@ .pomodoro-focus-dialog { + text-align: center; + + .md-dialog-content { + } + .inner-wrapper { + max-width: $component-max-width; + margin: auto; + } + .timer { font-weight: bold; text-align: center; font-size: 34px; - margin: 20px 0; + margin: 5px 0 0; } - .task { + .task.is-current { + border: none; + background: transparent; + .title { + &, + input { + text-align: center; + } + } + + md-progress-linear { + // needed to overwrite ng-materials default styles + margin-bottom: 10px !important; + border-bottom: 1px dashed #bcbcbc; + + .md-bar, + .md-container { + height: 8px; + } + } + + .time { text-align: center; + font-size: 16px; + margin-bottom: 15px; + } + + .notes { + margin-top: 15px; + inline-markdown { + text-align: left; + } + } + + task-local-links { + li { + display: inline-block; + a { + display: inline-block; + white-space: nowrap; + } + + .trash-button { + margin-left: 5px; + } + } } } } diff --git a/app-src/scripts/dialogs/pomodoro-focus/pomodoro-focus-c.html b/app-src/scripts/dialogs/pomodoro-focus/pomodoro-focus-c.html index 7813c1dcf1..6f19388023 100644 --- a/app-src/scripts/dialogs/pomodoro-focus/pomodoro-focus-c.html +++ b/app-src/scripts/dialogs/pomodoro-focus/pomodoro-focus-c.html @@ -4,7 +4,7 @@

- + Focus Mode

@@ -20,36 +20,113 @@ style="position: relative;" flex>
-
+
+
-
-

-
-
-
- +
+

+ +
+ +
+ + + Start/Pause working + + + + + + + + + + + Go to issue page + + + + Mark as done and start next task +
-
+ + +
+
+ +
+ +
+ + + +
+ +
+
Assignee:
+
+ +
+ + + +
+ +
+ + +
    +
  • + []: + +
  • +
+
+
+
- - - - - But I want to work (skip break)!! - Go back to work! - - - Hide me - - diff --git a/app-src/scripts/dialogs/pomodoro-focus/pomodoro-focus-c.js b/app-src/scripts/dialogs/pomodoro-focus/pomodoro-focus-c.js index 185064d080..058bb0e759 100644 --- a/app-src/scripts/dialogs/pomodoro-focus/pomodoro-focus-c.js +++ b/app-src/scripts/dialogs/pomodoro-focus/pomodoro-focus-c.js @@ -14,16 +14,18 @@ .controller('PomodoroFocusCtrl', PomodoroFocusCtrl); /* @ngInject */ - function PomodoroFocusCtrl($mdDialog, $rootScope, theme, pomodoroData, pomodoroConfig, $scope, $timeout, IS_ELECTRON, PomodoroButton, Notifier) { + function PomodoroFocusCtrl($mdDialog, $rootScope, theme, pomodoroData, pomodoroConfig, $scope, $timeout, IS_ELECTRON, PomodoroButton, Notifier, Tasks) { this.r = $rootScope.r; this.theme = theme; this.pomodoroData = pomodoroData; this.isShowDistractionsOnFocus = pomodoroConfig.isShowDistractionsOnFocus; this.isFocusDone = false; - this.currentTask = this.r.currentTask; + + this.currentTask = Tasks.getCurrent(); + this.task = Tasks.getCurrent() || Tasks.getLastCurrent(); console.log(this.r); - + if (IS_ELECTRON) { window.ipcRenderer.send('SHOW_OR_FOCUS'); }