Removed unused webcomponent support
This commit is contained in:
parent
a065bc643e
commit
f187a3a00d
2 changed files with 0 additions and 74 deletions
|
|
@ -1,61 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="uk-padding-small">
|
|
||||||
<div v-if="error" class="uk-padding-small uk-text-danger">
|
|
||||||
<b>{{ error }}</b>
|
|
||||||
</div>
|
|
||||||
<component
|
|
||||||
:is="componentName"
|
|
||||||
v-if="ready"
|
|
||||||
:component-base-u-r-l="ApiRootURL"
|
|
||||||
></component>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "WebComponentLoader",
|
|
||||||
|
|
||||||
props: {
|
|
||||||
componentURL: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
componentName: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
data: function() {
|
|
||||||
return {
|
|
||||||
ready: false,
|
|
||||||
error: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
ApiRootURL: function() {
|
|
||||||
return `${this.$store.getters.baseUri}/api/v2`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
// Method 2
|
|
||||||
this.$loadScript(this.componentURL)
|
|
||||||
.then(() => {
|
|
||||||
const el = customElements.get(this.componentName);
|
|
||||||
if (el) {
|
|
||||||
this.ready = true;
|
|
||||||
} else {
|
|
||||||
this.error = `Error: No component ${this.componentName} found.`;
|
|
||||||
}
|
|
||||||
this.ready = true;
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.ready = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
@ -3,12 +3,6 @@
|
||||||
<div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove">
|
<div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove">
|
||||||
<div class="control-component">
|
<div class="control-component">
|
||||||
<vue-friendly-iframe v-if="frame" :src="frame.href"></vue-friendly-iframe>
|
<vue-friendly-iframe v-if="frame" :src="frame.href"></vue-friendly-iframe>
|
||||||
<div v-else-if="webComponent">
|
|
||||||
<WebComponentLoader
|
|
||||||
:component-u-r-l="webComponent.href"
|
|
||||||
:component-name="webComponent.name"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<!-- Handle OpenFlexure Forms -->
|
<!-- Handle OpenFlexure Forms -->
|
||||||
<div
|
<div
|
||||||
v-for="form in forms"
|
v-for="form in forms"
|
||||||
|
|
@ -37,7 +31,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import JsonForm from "../pluginComponents/JsonForm";
|
import JsonForm from "../pluginComponents/JsonForm";
|
||||||
import WebComponentLoader from "../pluginComponents/WebComponentLoader";
|
|
||||||
import streamDisplay from "./streamContent.vue";
|
import streamDisplay from "./streamContent.vue";
|
||||||
import galleryContent from "../tabContentComponents/galleryContent.vue";
|
import galleryContent from "../tabContentComponents/galleryContent.vue";
|
||||||
import settingsContent from "../tabContentComponents/settingsContent.vue";
|
import settingsContent from "../tabContentComponents/settingsContent.vue";
|
||||||
|
|
@ -47,7 +40,6 @@ export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
JsonForm,
|
JsonForm,
|
||||||
WebComponentLoader,
|
|
||||||
streamDisplay,
|
streamDisplay,
|
||||||
galleryContent,
|
galleryContent,
|
||||||
settingsContent
|
settingsContent
|
||||||
|
|
@ -59,11 +51,6 @@ export default {
|
||||||
required: false,
|
required: false,
|
||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
webComponent: {
|
|
||||||
type: Object,
|
|
||||||
required: false,
|
|
||||||
default: null
|
|
||||||
},
|
|
||||||
frame: {
|
frame: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false,
|
required: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue