ui_migration refactor(store) use pinia stores in components
This commit is contained in:
parent
694a5a690f
commit
3a5a7488dd
25 changed files with 284 additions and 273 deletions
|
|
@ -257,7 +257,7 @@ export default {
|
|||
*
|
||||
*/
|
||||
async checkExistingTasks() {
|
||||
const ongoingTask = await this.getOngingAction(this.thing, this.action);
|
||||
const ongoingTask = await this.getOngoingAction(this.thing, this.action);
|
||||
if (ongoingTask) {
|
||||
// There is a started task
|
||||
this.taskStarted = true;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default {
|
|||
computed: {
|
||||
barWidthFromProgress: function () {
|
||||
var progress = this.progress <= 100 ? this.progress : 100;
|
||||
var styleString = `width: ${progress}%`;
|
||||
var styleString = progress != null ? `width: ${progress}%` : `width: 0%`;
|
||||
return styleString;
|
||||
},
|
||||
indeterminateProgressBar: function () {
|
||||
|
|
|
|||
|
|
@ -67,11 +67,9 @@ export default {
|
|||
|
||||
computed: {
|
||||
propertyDescription: function () {
|
||||
try {
|
||||
return this.thingDescription(this.thingName).properties[this.propertyName];
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
const td = this.wotStore.thingDescriptions[this.thingName];
|
||||
if (!td || !td.properties) return undefined;
|
||||
return td.properties[this.propertyName];
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue