starting on oobe, moved components and pages to json
This commit is contained in:
parent
4d4c85dd1e
commit
04ff3717e2
6 changed files with 1010 additions and 888 deletions
|
@ -28,6 +28,7 @@ import * as os from "os";
|
|||
import wallpaper from "wallpaper";
|
||||
import * as AdmZip from "adm-zip";
|
||||
|
||||
|
||||
/**
|
||||
* @file Creates the BrowserWindow
|
||||
* @author CiderCollective
|
||||
|
@ -49,213 +50,8 @@ export class BrowserWindow {
|
|||
dev: app.isPackaged,
|
||||
osRelease: os.release(),
|
||||
updatable: !process.windowsStore || !process.mas,
|
||||
components: [
|
||||
"pages/podcasts",
|
||||
"pages/apple-account-settings",
|
||||
"pages/library-songs",
|
||||
"pages/library-albums",
|
||||
"pages/library-artists",
|
||||
"pages/browse",
|
||||
"pages/groupings",
|
||||
"pages/settings",
|
||||
"pages/installed-themes",
|
||||
"pages/listen_now",
|
||||
"pages/radio",
|
||||
"pages/home",
|
||||
"pages/artist-feed",
|
||||
"pages/cider-playlist",
|
||||
"pages/playlist-inline",
|
||||
"pages/recordLabel",
|
||||
"pages/cider-multiroom",
|
||||
"pages/collection-list",
|
||||
"pages/apple-curator",
|
||||
"pages/artist",
|
||||
"pages/search",
|
||||
"pages/about",
|
||||
"pages/library-videos",
|
||||
"pages/remote-pair",
|
||||
"pages/themes-github",
|
||||
"pages/plugins-github",
|
||||
"pages/replay",
|
||||
"pages/audiolabs",
|
||||
"pages/zoo",
|
||||
"pages/plugin-renderer",
|
||||
"pages/keybinds",
|
||||
"components/mediaitem-artwork",
|
||||
"components/artwork-material",
|
||||
"components/menu-panel",
|
||||
"components/sidebar-playlist",
|
||||
"components/audio-settings",
|
||||
"components/plugin-menu",
|
||||
"components/audio-controls",
|
||||
"components/audio-playbackrate",
|
||||
"components/qrcode-modal",
|
||||
"components/moreinfo-modal",
|
||||
"components/equalizer",
|
||||
"components/add-to-playlist",
|
||||
"components/queue",
|
||||
"components/mediaitem-scroller-horizontal",
|
||||
"components/mediaitem-scroller-horizontal-large",
|
||||
"components/mediaitem-scroller-horizontal-sp",
|
||||
"components/mediaitem-scroller-horizontal-mvview",
|
||||
"components/mediaitem-list-item",
|
||||
"components/mediaitem-hrect",
|
||||
"components/mediaitem-square",
|
||||
"components/mediaitem-mvview",
|
||||
// "components/libraryartist-item",
|
||||
"components/listennow-child",
|
||||
"components/mediaitem-mvview-sp",
|
||||
"components/animatedartwork-view",
|
||||
"components/listitem-horizontal",
|
||||
"components/lyrics-view",
|
||||
"components/fullscreen",
|
||||
"components/miniplayer",
|
||||
"components/castmenu",
|
||||
"components/airplay-modal",
|
||||
"components/artist-chip",
|
||||
"components/hello-world",
|
||||
"components/inline-collection-list",
|
||||
],
|
||||
appRoutes: [
|
||||
{
|
||||
page: "plugin-renderer",
|
||||
component: `<plugin-renderer></plugin-renderer>`,
|
||||
condition: "page == 'plugin-renderer'"
|
||||
},
|
||||
{
|
||||
page: "zoo",
|
||||
component: "<cider-zoo></cider-zoo>",
|
||||
condition: "page == 'zoo'"
|
||||
},
|
||||
{
|
||||
page: "podcasts",
|
||||
component: `<apple-podcasts></apple-podcasts>`,
|
||||
condition: `page == 'podcasts'`
|
||||
}, {
|
||||
page: "library-videos",
|
||||
component: `<cider-library-videos></cider-library-videos>`,
|
||||
condition: `page == 'library-videos'`
|
||||
}, {
|
||||
page: "apple-account-settings",
|
||||
component: `<apple-account-settings></apple-account-settings>`,
|
||||
condition: `page == 'apple-account-settings'`
|
||||
}, {
|
||||
page: "about",
|
||||
component: `<about-page></about-page>`,
|
||||
condition: `page == 'about'`
|
||||
}, {
|
||||
page: "cider-artist",
|
||||
component: `<cider-artist :data="artistPage.data"></cider-artist>`,
|
||||
condition: `page == 'artist-page' && artistPage.data.attributes`
|
||||
}, {
|
||||
page: "collection-list",
|
||||
component: `<cider-collection-list :data="collectionList.response" :type="collectionList.type" :title="collectionList.title"></cider-collection-list>`,
|
||||
condition: `page == 'collection-list'`
|
||||
}, {
|
||||
page: "home",
|
||||
component: `<cider-home></cider-home>`,
|
||||
condition: `page == 'home'`
|
||||
}, {
|
||||
page: "artist-feed",
|
||||
component: `<cider-artist-feed></cider-artist-feed>`,
|
||||
condition: `page == 'artist-feed'`
|
||||
}, {
|
||||
page: "playlist-inline",
|
||||
component: `<playlist-inline :data="showingPlaylist"></playlist-inline>`,
|
||||
condition: `modals.showPlaylist`
|
||||
}, {
|
||||
page: "playlist_",
|
||||
component: `<cider-playlist :data="showingPlaylist"></cider-playlist>`,
|
||||
condition: `page.includes('playlist_')`
|
||||
}, {
|
||||
page: "album_",
|
||||
component: `<cider-playlist :data="showingPlaylist"></cider-playlist>`,
|
||||
condition: `page.includes('album_')`
|
||||
}, {
|
||||
page: "recordLabel_",
|
||||
component: `<cider-recordlabel :data="showingPlaylist"></cider-recordlabel>`,
|
||||
condition: `page.includes('recordLabel_')`
|
||||
}, {
|
||||
page: "multiroom",
|
||||
component: `<cider-multiroom :data="multiroom"></cider-multiroom>`,
|
||||
condition: `page.includes('multiroom')`
|
||||
}, {
|
||||
page: "curator_",
|
||||
component: `<cider-recordlabel :data="showingPlaylist"></cider-recordlabel>`,
|
||||
condition: `page.includes('curator_')`
|
||||
}, {
|
||||
page: "browsepage",
|
||||
component: `<cider-browse :data="browsepage"></cider-browse>`,
|
||||
condition: `page == 'browse'`,
|
||||
onEnter: ``
|
||||
},{
|
||||
page: "groupings",
|
||||
component: `<cider-groupings :data="browsepage"></cider-groupings>`,
|
||||
condition: `page == 'groupings'`,
|
||||
onEnter: ``
|
||||
}, {
|
||||
page: "listen_now",
|
||||
component: `<cider-listen-now :data="listennow"></cider-listen-now>`,
|
||||
condition: `page == 'listen_now'`,
|
||||
onEnter: ``
|
||||
}, {
|
||||
page: "radio",
|
||||
component: `<cider-radio :data="radio"></cider-radio>`,
|
||||
condition: `page == 'radio'`,
|
||||
onEnter: ``
|
||||
}, {
|
||||
page: "settings",
|
||||
component: `<cider-settings></cider-settings>`,
|
||||
condition: `page == 'settings'`
|
||||
}, {
|
||||
page: "installed-themes",
|
||||
component: `<installed-themes></installed-themes>`,
|
||||
condition: `page == 'installed-themes'`
|
||||
}, {
|
||||
page: "search",
|
||||
component: `<cider-search :search="search"></cider-search>`,
|
||||
condition: `page == 'search'`
|
||||
}, {
|
||||
page: "library-songs",
|
||||
component: `<cider-library-songs :data="library.songs"></cider-library-songs>`,
|
||||
condition: `page == 'library-songs'`,
|
||||
onEnter: ``
|
||||
}, {
|
||||
page: "library-albums",
|
||||
component: `<cider-library-albums :data="library.songs"></cider-library-albums>`,
|
||||
condition: `page == 'library-albums'`,
|
||||
onEnter: ``
|
||||
}, {
|
||||
page: "library-artists",
|
||||
component: `<cider-library-artists></cider-library-artists>`,
|
||||
condition: `page == 'library-artists'`,
|
||||
onEnter: ``
|
||||
}, {
|
||||
page: "appleCurator",
|
||||
component: `<cider-applecurator :data="appleCurator"></cider-applecurator>`,
|
||||
condition: `page.includes('appleCurator')`
|
||||
}, {
|
||||
page: "themes-github",
|
||||
component: `<themes-github></themes-github>`,
|
||||
condition: `page == 'themes-github'`
|
||||
}, {
|
||||
page: "plugins-github",
|
||||
component: `<plugins-github></plugins-github>`,
|
||||
condition: `page == 'plugins-github'`
|
||||
}, {
|
||||
page: "remote-pair",
|
||||
component: `<remote-pair></remote-pair>`,
|
||||
condition: `page == 'remote-pair'`
|
||||
}, {
|
||||
page: "audiolabs",
|
||||
component: `<audiolabs-page></audiolabs-page>`,
|
||||
condition: `page == 'audiolabs'`
|
||||
}, {
|
||||
page: "replay",
|
||||
component: `<replay-page></replay-page>`,
|
||||
condition: `page == 'replay'`
|
||||
}
|
||||
]
|
||||
components: require("./vcomponents.json"),
|
||||
appRoutes: require("./vrouting.json")
|
||||
},
|
||||
};
|
||||
private options: any = {
|
||||
|
|
67
src/main/base/vcomponents.json
Normal file
67
src/main/base/vcomponents.json
Normal file
|
@ -0,0 +1,67 @@
|
|||
[
|
||||
"pages/podcasts",
|
||||
"pages/apple-account-settings",
|
||||
"pages/library-songs",
|
||||
"pages/library-albums",
|
||||
"pages/library-artists",
|
||||
"pages/browse",
|
||||
"pages/groupings",
|
||||
"pages/settings",
|
||||
"pages/installed-themes",
|
||||
"pages/listen_now",
|
||||
"pages/radio",
|
||||
"pages/home",
|
||||
"pages/artist-feed",
|
||||
"pages/cider-playlist",
|
||||
"pages/playlist-inline",
|
||||
"pages/recordLabel",
|
||||
"pages/cider-multiroom",
|
||||
"pages/collection-list",
|
||||
"pages/apple-curator",
|
||||
"pages/artist",
|
||||
"pages/search",
|
||||
"pages/about",
|
||||
"pages/library-videos",
|
||||
"pages/remote-pair",
|
||||
"pages/themes-github",
|
||||
"pages/plugins-github",
|
||||
"pages/replay",
|
||||
"pages/audiolabs",
|
||||
"pages/zoo",
|
||||
"pages/plugin-renderer",
|
||||
"pages/keybinds",
|
||||
"pages/oobe",
|
||||
"components/mediaitem-artwork",
|
||||
"components/artwork-material",
|
||||
"components/menu-panel",
|
||||
"components/sidebar-playlist",
|
||||
"components/audio-settings",
|
||||
"components/plugin-menu",
|
||||
"components/audio-controls",
|
||||
"components/audio-playbackrate",
|
||||
"components/qrcode-modal",
|
||||
"components/moreinfo-modal",
|
||||
"components/equalizer",
|
||||
"components/add-to-playlist",
|
||||
"components/queue",
|
||||
"components/mediaitem-scroller-horizontal",
|
||||
"components/mediaitem-scroller-horizontal-large",
|
||||
"components/mediaitem-scroller-horizontal-sp",
|
||||
"components/mediaitem-scroller-horizontal-mvview",
|
||||
"components/mediaitem-list-item",
|
||||
"components/mediaitem-hrect",
|
||||
"components/mediaitem-square",
|
||||
"components/mediaitem-mvview",
|
||||
"components/listennow-child",
|
||||
"components/mediaitem-mvview-sp",
|
||||
"components/animatedartwork-view",
|
||||
"components/listitem-horizontal",
|
||||
"components/lyrics-view",
|
||||
"components/fullscreen",
|
||||
"components/miniplayer",
|
||||
"components/castmenu",
|
||||
"components/airplay-modal",
|
||||
"components/artist-chip",
|
||||
"components/hello-world",
|
||||
"components/inline-collection-list"
|
||||
]
|
174
src/main/base/vrouting.json
Normal file
174
src/main/base/vrouting.json
Normal file
|
@ -0,0 +1,174 @@
|
|||
[
|
||||
{
|
||||
"page": "plugin-renderer",
|
||||
"component": "<plugin-renderer></plugin-renderer>",
|
||||
"condition": "page == 'plugin-renderer'"
|
||||
},
|
||||
{
|
||||
"page": "zoo",
|
||||
"component": "<cider-zoo></cider-zoo>",
|
||||
"condition": "page == 'zoo'"
|
||||
},
|
||||
{
|
||||
"page": "podcasts",
|
||||
"component": "<apple-podcasts></apple-podcasts>",
|
||||
"condition": "page == 'podcasts'"
|
||||
},
|
||||
{
|
||||
"page": "library-videos",
|
||||
"component": "<cider-library-videos></cider-library-videos>",
|
||||
"condition": "page == 'library-videos'"
|
||||
},
|
||||
{
|
||||
"page": "apple-account-settings",
|
||||
"component": "<apple-account-settings></apple-account-settings>",
|
||||
"condition": "page == 'apple-account-settings'"
|
||||
},
|
||||
{
|
||||
"page": "about",
|
||||
"component": "<about-page></about-page>",
|
||||
"condition": "page == 'about'"
|
||||
},
|
||||
{
|
||||
"page": "cider-artist",
|
||||
"component": "<cider-artist :data=\"artistPage.data\"></cider-artist>",
|
||||
"condition": "page == 'artist-page' && artistPage.data.attributes"
|
||||
},
|
||||
{
|
||||
"page": "collection-list",
|
||||
"component": "<cider-collection-list :data=\"collectionList.response\" :type=\"collectionList.type\" :title=\"collectionList.title\"></cider-collection-list>",
|
||||
"condition": "page == 'collection-list'"
|
||||
},
|
||||
{
|
||||
"page": "home",
|
||||
"component": "<cider-home></cider-home>",
|
||||
"condition": "page == 'home'"
|
||||
},
|
||||
{
|
||||
"page": "artist-feed",
|
||||
"component": "<cider-artist-feed></cider-artist-feed>",
|
||||
"condition": "page == 'artist-feed'"
|
||||
},
|
||||
{
|
||||
"page": "playlist-inline",
|
||||
"component": "<playlist-inline :data=\"showingPlaylist\"></playlist-inline>",
|
||||
"condition": "modals.showPlaylist"
|
||||
},
|
||||
{
|
||||
"page": "playlist_",
|
||||
"component": "<cider-playlist :data=\"showingPlaylist\"></cider-playlist>",
|
||||
"condition": "page.includes('playlist_')"
|
||||
},
|
||||
{
|
||||
"page": "oobe",
|
||||
"component": "<cider-oobe/>",
|
||||
"condition": "page == 'oobe'"
|
||||
},
|
||||
{
|
||||
"page": "album_",
|
||||
"component": "<cider-playlist :data=\"showingPlaylist\"></cider-playlist>",
|
||||
"condition": "page.includes('album_')"
|
||||
},
|
||||
{
|
||||
"page": "recordLabel_",
|
||||
"component": "<cider-recordlabel :data=\"showingPlaylist\"></cider-recordlabel>",
|
||||
"condition": "page.includes('recordLabel_')"
|
||||
},
|
||||
{
|
||||
"page": "multiroom",
|
||||
"component": "<cider-multiroom :data=\"multiroom\"></cider-multiroom>",
|
||||
"condition": "page.includes('multiroom')"
|
||||
},
|
||||
{
|
||||
"page": "curator_",
|
||||
"component": "<cider-recordlabel :data=\"showingPlaylist\"></cider-recordlabel>",
|
||||
"condition": "page.includes('curator_')"
|
||||
},
|
||||
{
|
||||
"page": "browsepage",
|
||||
"component": "<cider-browse :data=\"browsepage\"></cider-browse>",
|
||||
"condition": "page == 'browse'",
|
||||
"onEnter": ""
|
||||
},
|
||||
{
|
||||
"page": "groupings",
|
||||
"component": "<cider-groupings :data=\"browsepage\"></cider-groupings>",
|
||||
"condition": "page == 'groupings'",
|
||||
"onEnter": ""
|
||||
},
|
||||
{
|
||||
"page": "listen_now",
|
||||
"component": "<cider-listen-now :data=\"listennow\"></cider-listen-now>",
|
||||
"condition": "page == 'listen_now'",
|
||||
"onEnter": ""
|
||||
},
|
||||
{
|
||||
"page": "radio",
|
||||
"component": "<cider-radio :data=\"radio\"></cider-radio>",
|
||||
"condition": "page == 'radio'",
|
||||
"onEnter": ""
|
||||
},
|
||||
{
|
||||
"page": "settings",
|
||||
"component": "<cider-settings></cider-settings>",
|
||||
"condition": "page == 'settings'"
|
||||
},
|
||||
{
|
||||
"page": "installed-themes",
|
||||
"component": "<installed-themes></installed-themes>",
|
||||
"condition": "page == 'installed-themes'"
|
||||
},
|
||||
{
|
||||
"page": "search",
|
||||
"component": "<cider-search :search=\"search\"></cider-search>",
|
||||
"condition": "page == 'search'"
|
||||
},
|
||||
{
|
||||
"page": "library-songs",
|
||||
"component": "<cider-library-songs :data=\"library.songs\"></cider-library-songs>",
|
||||
"condition": "page == 'library-songs'",
|
||||
"onEnter": ""
|
||||
},
|
||||
{
|
||||
"page": "library-albums",
|
||||
"component": "<cider-library-albums :data=\"library.songs\"></cider-library-albums>",
|
||||
"condition": "page == 'library-albums'",
|
||||
"onEnter": ""
|
||||
},
|
||||
{
|
||||
"page": "library-artists",
|
||||
"component": "<cider-library-artists></cider-library-artists>",
|
||||
"condition": "page == 'library-artists'",
|
||||
"onEnter": ""
|
||||
},
|
||||
{
|
||||
"page": "appleCurator",
|
||||
"component": "<cider-applecurator :data=\"appleCurator\"></cider-applecurator>",
|
||||
"condition": "page.includes('appleCurator')"
|
||||
},
|
||||
{
|
||||
"page": "themes-github",
|
||||
"component": "<themes-github></themes-github>",
|
||||
"condition": "page == 'themes-github'"
|
||||
},
|
||||
{
|
||||
"page": "plugins-github",
|
||||
"component": "<plugins-github></plugins-github>",
|
||||
"condition": "page == 'plugins-github'"
|
||||
},
|
||||
{
|
||||
"page": "remote-pair",
|
||||
"component": "<remote-pair></remote-pair>",
|
||||
"condition": "page == 'remote-pair'"
|
||||
},
|
||||
{
|
||||
"page": "audiolabs",
|
||||
"component": "<audiolabs-page></audiolabs-page>",
|
||||
"condition": "page == 'audiolabs'"
|
||||
},
|
||||
{
|
||||
"page": "replay",
|
||||
"component": "<replay-page></replay-page>",
|
||||
"condition": "page == 'replay'"
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load diff
33
src/renderer/views/pages/oobe.ejs
Normal file
33
src/renderer/views/pages/oobe.ejs
Normal file
|
@ -0,0 +1,33 @@
|
|||
<script type="text/x-template" id="cider-oobe">
|
||||
<div class="content-inner oobe">
|
||||
<div class="oobe-view">
|
||||
<div class="oobe-header">
|
||||
Welcome to Cider
|
||||
</div>
|
||||
<div class="oobe-body">
|
||||
body text
|
||||
</div>
|
||||
<div class="oobe-footer">
|
||||
<div class="btn-group">
|
||||
<div class="md-btn">Previous</div>
|
||||
<div class="md-btn">Next</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
Vue.component('cider-oobe', {
|
||||
template: '#cider-oobe',
|
||||
data: function () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue