working on plugin pages

This commit is contained in:
booploops 2022-03-08 02:26:47 -08:00
parent 10435d5b7c
commit bd4a2e7d27
4 changed files with 40 additions and 2 deletions

View file

@ -217,7 +217,11 @@ const app = new Vue({
}
},
pauseButtonTimer: null,
activeCasts: []
activeCasts: [],
pluginPages: {
page: "hello-world",
pages: [],
}
},
watch: {
cfg: {
@ -1488,6 +1492,11 @@ const app = new Vue({
let page = hash[0]
let id = hash[1]
let isLibrary = hash[2] ?? false
if(page == "plugin") {
this.pluginPages.page = "plugin." + id
this.page = "plugin-renderer"
return
}
this.routeView({
kind: page,
id: id,

View file

@ -3,7 +3,7 @@
</script>
<script>
Vue.component('hello-world', {
var hw = Vue.component('hello-world', {
template: '#hello-world',
methods: {
sayHello: function () {

View file

@ -0,0 +1,22 @@
<script>
Vue.component('plugin-renderer', {
/*html*/
template: `
<component :is="getPage()"></component>
`,
data: function () {
return {
app: this.$root,
}
},
props: {},
mounted() {
},
methods: {
getPage() {
return this.$root.pluginPages.page
}
},
}
);
</script>