From 3dbcb287a460e4500316ea459bd342c5a62b1e66 Mon Sep 17 00:00:00 2001 From: Bruno Thomas Date: Mon, 19 Aug 2024 13:59:02 +0000 Subject: [PATCH] feat: add CREATED status for tasks ICIJ/datashare#1399 Co-authored-by: Caroline Desprat --- src/components/EllipseStatus.vue | 11 +++++++---- src/utils/settings.js | 3 ++- tests/unit/specs/components/EllipseStatus.spec.js | 6 ++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/components/EllipseStatus.vue b/src/components/EllipseStatus.vue index 75635ab639..dc5c7eaa9a 100644 --- a/src/components/EllipseStatus.vue +++ b/src/components/EllipseStatus.vue @@ -79,13 +79,13 @@ export default { return style.getPropertyValue('--light') || '#eee' }, statusAnimation() { - if (this.statusAsVariant === 'info') { + if (this.variantIsInfo) { return this.animation } return 'default 0 0' }, statusProgress() { - if (this.statusAsVariant === 'info') { + if (this.variantIsInfo) { const rounded = Math.round(this.progress) return Math.max(Math.min(rounded, 100), 0) } @@ -97,8 +97,11 @@ export default { statusAsVariant() { return toVariant(this.status) }, + variantIsInfo() { + return this.statusAsVariant === 'info' + }, loading() { - return this.statusAsVariant === 'info' && this.idle + return this.variantIsInfo && this.idle }, idle() { return this.progress === null || this.progress <= 0 || this.progress >= 100 @@ -133,7 +136,7 @@ export default { :loading="loading" > -