Format fixes
This commit is contained in:
parent
59e0cf5905
commit
5d87a7582e
3 changed files with 8 additions and 4 deletions
|
|
@ -143,7 +143,7 @@ export default {
|
|||
computed: {
|
||||
cameraUri: function() {
|
||||
return `${this.$store.getters.baseUri}/camera/`;
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue