working on plugin pages
This commit is contained in:
parent
10435d5b7c
commit
bd4a2e7d27
4 changed files with 40 additions and 2 deletions
|
@ -60,6 +60,7 @@ export class BrowserWindow {
|
||||||
"pages/replay",
|
"pages/replay",
|
||||||
"pages/audiolabs",
|
"pages/audiolabs",
|
||||||
"pages/zoo",
|
"pages/zoo",
|
||||||
|
"pages/plugin-renderer",
|
||||||
"components/mediaitem-artwork",
|
"components/mediaitem-artwork",
|
||||||
"components/artwork-material",
|
"components/artwork-material",
|
||||||
"components/menu-panel",
|
"components/menu-panel",
|
||||||
|
@ -90,8 +91,14 @@ export class BrowserWindow {
|
||||||
"components/miniplayer",
|
"components/miniplayer",
|
||||||
"components/castmenu",
|
"components/castmenu",
|
||||||
"components/artist-chip",
|
"components/artist-chip",
|
||||||
|
"components/hello-world",
|
||||||
],
|
],
|
||||||
appRoutes: [
|
appRoutes: [
|
||||||
|
{
|
||||||
|
page: "plugin-renderer",
|
||||||
|
component: `<plugin-renderer></plugin-renderer>`,
|
||||||
|
condition: "page == 'plugin-renderer'"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
page: "zoo",
|
page: "zoo",
|
||||||
component: "<cider-zoo></cider-zoo>",
|
component: "<cider-zoo></cider-zoo>",
|
||||||
|
|
|
@ -217,7 +217,11 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pauseButtonTimer: null,
|
pauseButtonTimer: null,
|
||||||
activeCasts: []
|
activeCasts: [],
|
||||||
|
pluginPages: {
|
||||||
|
page: "hello-world",
|
||||||
|
pages: [],
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cfg: {
|
cfg: {
|
||||||
|
@ -1488,6 +1492,11 @@ const app = new Vue({
|
||||||
let page = hash[0]
|
let page = hash[0]
|
||||||
let id = hash[1]
|
let id = hash[1]
|
||||||
let isLibrary = hash[2] ?? false
|
let isLibrary = hash[2] ?? false
|
||||||
|
if(page == "plugin") {
|
||||||
|
this.pluginPages.page = "plugin." + id
|
||||||
|
this.page = "plugin-renderer"
|
||||||
|
return
|
||||||
|
}
|
||||||
this.routeView({
|
this.routeView({
|
||||||
kind: page,
|
kind: page,
|
||||||
id: id,
|
id: id,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
Vue.component('hello-world', {
|
var hw = Vue.component('hello-world', {
|
||||||
template: '#hello-world',
|
template: '#hello-world',
|
||||||
methods: {
|
methods: {
|
||||||
sayHello: function () {
|
sayHello: function () {
|
||||||
|
|
22
src/renderer/views/pages/plugin-renderer.ejs
Normal file
22
src/renderer/views/pages/plugin-renderer.ejs
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue