Format fixes

This commit is contained in:
Richard Bowman 2023-12-01 02:23:58 +00:00
parent 59e0cf5905
commit 5d87a7582e
3 changed files with 8 additions and 4 deletions

View file

@ -143,7 +143,7 @@ export default {
computed: {
cameraUri: function() {
return `${this.$store.getters.baseUri}/camera/`;
},
}
}
};
</script>

View file

@ -67,7 +67,11 @@ Vue.mixin({
}
},
thingActionUrl(thing, action) {
return this.$store.getters["wot/thingActionUrl"](thing, action, "invokeaction");
return this.$store.getters["wot/thingActionUrl"](
thing,
action,
"invokeaction"
);
},
modalConfirm: function(modalText) {
var context = this;

View file

@ -75,8 +75,7 @@ export const wotStoreModule = {
if ("base" in td) {
let base = td.base;
if (href.startsWith("/")) href = href.slice(1);
if (!base.endsWith("/"))
base += "/";
if (!base.endsWith("/")) base += "/";
return base + href;
}
return href;
@ -96,6 +95,7 @@ export function findFormHref(affordance, op) {
// Find the form in the affordance that matches the given operation type
let forms = affordance.forms;
let matchingForm = forms.find(f => f.op == op || f.op.includes(op));
if (matchingForm == undefined) return undefined;
return matchingForm.href;
}