add apple-curator page
This commit is contained in:
parent
6ab5534ee8
commit
0ca70784c6
3 changed files with 59 additions and 3 deletions
|
@ -141,6 +141,7 @@ const app = new Vue({
|
|||
loading: false
|
||||
},
|
||||
showingPlaylist: [],
|
||||
appleCurator: [],
|
||||
artistPage: {
|
||||
data: {},
|
||||
},
|
||||
|
@ -578,10 +579,19 @@ const app = new Vue({
|
|||
;
|
||||
let isLibrary = item.attributes.playParams ? (item.attributes.playParams.isLibrary ?? false) : false;
|
||||
console.log(kind, id, isLibrary)
|
||||
// disable apple-curators because they can't be played in MKjs
|
||||
if (!kind.toString().includes("apple-curator")) {
|
||||
|
||||
if (true) {
|
||||
app.showingPlaylist = [];
|
||||
if (kind.toString().includes("artist")) {
|
||||
if (kind.toString().includes("apple-curator")){
|
||||
kind = "appleCurator"
|
||||
app.getTypeFromID("appleCurator", (id), false, {
|
||||
platform: "web",
|
||||
include: "grouping,playlists",
|
||||
extend: "editorialArtwork",
|
||||
"art[url]": "f"
|
||||
});
|
||||
}
|
||||
else if (kind.toString().includes("artist")) {
|
||||
app.getArtistInfo(id, isLibrary)
|
||||
} else if (kind.toString().includes("record-label") || kind.toString().includes("curator")) {
|
||||
if (kind.toString().includes("record-label")) {
|
||||
|
|
|
@ -382,6 +382,12 @@
|
|||
%>
|
||||
</template>
|
||||
</transition>
|
||||
<transition name="wpfade">
|
||||
<template v-if="page.includes('appleCurator')" >
|
||||
<cider-applecurator :data="showingPlaylist"></cider-applecurator>
|
||||
</template>
|
||||
</transition>
|
||||
|
||||
</div>
|
||||
<transition name="drawertransition">
|
||||
<div class="app-drawer" v-if="drawer.open">
|
||||
|
@ -454,6 +460,9 @@
|
|||
<!-- Collection List -->
|
||||
<%- include('pages/collection-list') %>
|
||||
|
||||
<!-- Apple Curator -->
|
||||
<%- include('pages/apple-curator') %>
|
||||
|
||||
<!-- Artist Page -->
|
||||
<%- include('pages/artist') %>
|
||||
|
||||
|
|
37
src/renderer/views/pages/apple-curator.ejs
Normal file
37
src/renderer/views/pages/apple-curator.ejs
Normal file
|
@ -0,0 +1,37 @@
|
|||
<script type="text/x-template" id="cider-applecurator">
|
||||
<div class="content-inner">
|
||||
<h1 class="header-text">{{ data.attributes.shortName ?? data.attributes.name}}</h1>
|
||||
<template v-if="data.relationships && data.relationships.grouping">
|
||||
<template v-for="(recom,index) in data.relationships.grouping.data[0].relationships.tabs.data[0].relationships.children.data">
|
||||
<div class="row">
|
||||
<div class="col" v-if="recom.attributes.name != 'Chart Set'">
|
||||
<h3>{{ recom.attributes.name ?? ""}}</h3>
|
||||
</div>
|
||||
<div class="col-auto flex-center" v-if="index != 0 && recom.relationships && ((recom.relationships.children && recom.relationships.children.data.length > 10) || (recom.relationships.contents && recom.relationships.contents.data.length > 10))">
|
||||
<button class="cd-btn-seeall" @click="app.showCollection(recom.relationships.children ? recom.relationships.children : recom.relationships.contents, recom.attributes.name ?? '', 'listen_now')" >See All</button>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="recom.relationships && ((recom.relationships.children && recom.relationships.children.data) || (recom.relationships.contents && recom.relationships.contents.data))">
|
||||
<template v-if="(recom.attributes.name && recom.attributes.name.includes('ideo')) || index === 0">
|
||||
<mediaitem-scroller-horizontal-mvview :imagesize="800" :browsesp="index == 0"
|
||||
:items="recom.relationships.children ? recom.relationships.children.data.limit(10) : recom.relationships.contents.data.limit(10)"></mediaitem-scroller-horizontal-mvview>
|
||||
</template>
|
||||
<template v-else-if="recom.attributes.name == 'Chart Set'">
|
||||
|
||||
</template>
|
||||
<template v-else>
|
||||
<mediaitem-scroller-horizontal-large
|
||||
:items="recom.relationships.children ? recom.relationships.children.data.limit(10) : recom.relationships.contents.data.limit(10)"></mediaitem-scroller-horizontal-large>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('cider-applecurator', {
|
||||
template: "#cider-applecurator",
|
||||
props: ["data"]
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue