ui_migration refactor(store) use pinia stores in components

This commit is contained in:
Antonio Anaya 2026-04-21 23:29:24 -06:00
parent 694a5a690f
commit 3a5a7488dd
25 changed files with 284 additions and 273 deletions

View file

@ -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;

View file

@ -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 () {

View file

@ -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];
},
},