mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
* fix: check for null or undefined * refactor: `lint:fix` --------- Co-authored-by: Scott Bell <scott@traclabs.com>
This commit is contained in:
parent
e9b94c308b
commit
9f7b3b9225
@ -23,11 +23,13 @@
|
||||
<div class="c-progress-bar">
|
||||
<div
|
||||
class="c-progress-bar__bar"
|
||||
:class="{ '--indeterminate': model.progressPerc === null }"
|
||||
:class="{ '--indeterminate': !model.progressPerc }"
|
||||
:style="styleBarWidth"
|
||||
></div>
|
||||
<div v-if="model.progressText !== undefined" class="c-progress-bar__text">
|
||||
<span v-if="model.progressPerc > 0">{{ model.progressPerc }}% complete.</span>
|
||||
<span v-if="model.progressPerc && model.progressPerc > 0"
|
||||
>{{ model.progressPerc }}% complete.</span
|
||||
>
|
||||
{{ model.progressText }}
|
||||
</div>
|
||||
</div>
|
||||
@ -43,7 +45,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
styleBarWidth() {
|
||||
return this.model.progressPerc !== null ? `width: ${this.model.progressPerc}%;` : '';
|
||||
return this.model.progressPerc ? `width: ${this.model.progressPerc}%;` : '';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -40,7 +40,7 @@
|
||||
>
|
||||
|
||||
<progress-bar
|
||||
v-if="activeModel.progressPerc !== null"
|
||||
v-if="activeModel.progressPerc"
|
||||
class="c-message-banner__progress-bar"
|
||||
:model="activeModel"
|
||||
/>
|
||||
@ -178,7 +178,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.activeModel.progressPerc !== null) {
|
||||
if (this.activeModel.progressPerc) {
|
||||
maximizedDialog = this.openmct.overlays.progressDialog({
|
||||
buttons: [minimizeButton],
|
||||
...this.activeModel
|
||||
|
Loading…
Reference in New Issue
Block a user