diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-07-25 21:06:03 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-07-25 21:06:03 +0000 |
commit | 6709cfc61b8402734959496f6cc0120cc1aa98a7 (patch) | |
tree | 547ea304e511b1ab991438fa112b001370acc34d /app/assets/javascripts/sidebar | |
parent | 08e0d279aa98d05ae6632a3df3883df5d6d54733 (diff) | |
download | gitlab-ce-6709cfc61b8402734959496f6cc0120cc1aa98a7.tar.gz |
Replace issues time tracking progress bar with gitlab-ui's progress bar
Diffstat (limited to 'app/assets/javascripts/sidebar')
-rw-r--r-- | app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue b/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue index d335c3f55af..dc599e1b9fc 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue @@ -42,11 +42,14 @@ export default { return this.timeEstimate - this.timeSpent; }, timeRemainingPercent() { - return `${Math.floor((this.timeSpent / this.timeEstimate) * 100)}%`; + return Math.floor((this.timeSpent / this.timeEstimate) * 100); }, timeRemainingStatusClass() { return this.timeEstimate >= this.timeSpent ? 'within_estimate' : 'over_estimate'; }, + progressBarVariant() { + return this.timeRemainingPercent > 100 ? 'danger' : 'primary'; + }, }, }; </script> @@ -62,16 +65,10 @@ export default { data-placement="top" role="timeRemainingDisplay" > - <div - :aria-valuenow="timeRemainingPercent" - class="meter-container" - > - <div - :style="{ width: timeRemainingPercent }" - class="meter-fill" - > - </div> - </div> + <gl-progress-bar + :value="timeRemainingPercent" + :variant="progressBarVariant" + /> <div class="compare-display-container"> <div class="compare-display float-left"> <span class="compare-label"> |