diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-11-17 17:31:42 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-11-21 13:57:10 -0500 |
commit | f78935ead7ca9773d8146c054da67759ec578fc0 (patch) | |
tree | 1c4c18a4dc284e2dc12812c779876ce9cd406272 /app | |
parent | 1054fb965ce104f2f3abab57d1395204c62994fa (diff) | |
download | gitlab-ce-f78935ead7ca9773d8146c054da67759ec578fc0.tar.gz |
Do not show minutes if days is available
Also show seconds only when seconds is 0
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 index 02f518565ed..829ad4604ce 100644 --- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 @@ -9,8 +9,8 @@ <span class="total-time"> <template v-if="time.days">{{ time.days }} <span>{{ time.days === 1 ? 'day' : 'days' }}</span></template> <template v-if="time.hours">{{ time.hours }} <span>hr</span></template> - <template v-if="time.mins">{{ time.mins }} <span>mins</span></template> - <template v-if="time.seconds && Object.keys(time).length === 1">{{ time.seconds }} <span>s</span></template> + <template v-if="time.mins && !time.days">{{ time.mins }} <span>mins</span></template> + <template v-if="time.seconds && Object.keys(time).length === 1 || time.seconds === 0">{{ time.seconds }} <span>s</span></template> </span> `, }); |