profile page (for search for now)
This commit is contained in:
parent
123c6bc4d6
commit
6dd0c141bf
5 changed files with 44 additions and 42 deletions
|
@ -46,6 +46,7 @@
|
|||
"airtunes2": "git+https://github.com/ciderapp/node_airtunes2",
|
||||
"castv2-client": "^1.2.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"cider_utils": "git+https://github.com/ciderapp/cider_utils",
|
||||
"discord-auto-rpc": "^1.0.16",
|
||||
"dns-js": "git+https://github.com/ciderapp/node-dns-js.git",
|
||||
"ejs": "^3.1.6",
|
||||
|
@ -80,8 +81,7 @@
|
|||
"wallpaper": "5.0.1",
|
||||
"ws": "^8.5.0",
|
||||
"xml2js": "^0.4.23",
|
||||
"youtube-search-without-api-key": "^1.0.7",
|
||||
"cider_utils": "git+https://github.com/ciderapp/cider_utils"
|
||||
"youtube-search-without-api-key": "^1.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/adm-zip": "^0.5.0",
|
||||
|
|
|
@ -86,6 +86,7 @@ export class BrowserWindow {
|
|||
"pages/zoo",
|
||||
"pages/plugin-renderer",
|
||||
"pages/oobe",
|
||||
"pages/cider-profile",
|
||||
"components/app-content",
|
||||
"components/sidebar",
|
||||
"components/mediaitem-artwork",
|
||||
|
@ -193,6 +194,10 @@ export class BrowserWindow {
|
|||
page: "recordLabel_",
|
||||
component: `<cider-recordlabel :data="$root.showingPlaylist"></cider-recordlabel>`,
|
||||
condition: `$root.page.includes('recordLabel_')`
|
||||
}, {
|
||||
page: "social-profiles_",
|
||||
component: `<cider-socialprofile :data="$root.showingPlaylist"></cider-socialprofile>`,
|
||||
condition: `$root.page.includes('social-profiles_')`
|
||||
}, {
|
||||
page: "multiroom",
|
||||
component: `<cider-multiroom :data="$root.multiroom"></cider-multiroom>`,
|
||||
|
|
|
@ -69,6 +69,11 @@
|
|||
"component": "<cider-playlist :data=\"showingPlaylist\"></cider-playlist>",
|
||||
"condition": "page.includes('album_')"
|
||||
},
|
||||
{
|
||||
"page": "social-profiles_",
|
||||
"component": "<cider-socialprofile :data=\"showingPlaylist\"></cider-socialprofile>",
|
||||
"condition": "$root.page.includes('social-profiles_')"
|
||||
},
|
||||
{
|
||||
"page": "recordLabel_",
|
||||
"component": "<cider-recordlabel :data=\"showingPlaylist\"></cider-recordlabel>",
|
||||
|
|
|
@ -1966,7 +1966,7 @@ const app = new Vue({
|
|||
})
|
||||
|
||||
return;
|
||||
} else if(item.attributes.link.url.includes("viewFeature")) {
|
||||
} else if (item.attributes.link.url.includes("viewFeature")) {
|
||||
const params = new Proxy(new URLSearchParams(new URL(item.attributes.link.url).search), {
|
||||
get: (searchParams, prop) => searchParams.get(prop),
|
||||
});
|
||||
|
@ -1977,7 +1977,6 @@ const app = new Vue({
|
|||
app.routeView(item)
|
||||
}
|
||||
)
|
||||
|
||||
} else {
|
||||
window.open(item.attributes.link.url)
|
||||
}
|
||||
|
@ -2018,7 +2017,26 @@ const app = new Vue({
|
|||
});
|
||||
window.location.hash = `${kind}/${id}`
|
||||
document.querySelector("#app-content").scrollTop = 0
|
||||
} else if (!kind.toString().includes("radioStation") && !kind.toString().includes("song") && !kind.toString().includes("musicVideo") && !kind.toString().includes("uploadedVideo") && !kind.toString().includes("music-movie")) {
|
||||
} else if (kind = "social-profiles") {
|
||||
app.page = (kind) + "_" + (id);
|
||||
app.mk.api.v3.music(
|
||||
`/v1/social/${app.mk.storefrontId}/social-profiles/${id}`,
|
||||
{include:"shared-playlists"}).then(
|
||||
(data) => {
|
||||
console.log(data)
|
||||
app.showingPlaylist = data.data?.data[0]
|
||||
window.location.hash = `${kind}/${id}`
|
||||
document.querySelector("#app-content").scrollTop = 0
|
||||
}
|
||||
)
|
||||
// app.getTypeFromID((kind), (id), (isLibrary), {
|
||||
// extend: "editorialVideo",
|
||||
// include: 'grouping,playlists',
|
||||
// views: 'top-releases,latest-releases,top-artists'
|
||||
// });
|
||||
|
||||
}
|
||||
else if (!kind.toString().includes("radioStation") && !kind.toString().includes("song") && !kind.toString().includes("musicVideo") && !kind.toString().includes("uploadedVideo") && !kind.toString().includes("music-movie")) {
|
||||
let params = {
|
||||
extend: "offers,editorialVideo",
|
||||
"views": "appears-on,more-by-artist,related-videos,other-versions,you-might-also-like,video-extras,audio-extras",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script type="text/x-template" id="cider-recordlabel">
|
||||
<div class="content-inner profile-page">
|
||||
<script type="text/x-template" id="cider-socialprofile">
|
||||
<div class="content-inner artist-page profile-page">
|
||||
<div class="artist-header" :style="getArtistPalette(data)">
|
||||
<div class="row">
|
||||
<div class="col-sm" style="width: auto;">
|
||||
|
@ -10,56 +10,30 @@
|
|||
size="220" type="artists"></mediaitem-artwork>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col flex-center"
|
||||
>
|
||||
<h1>{{ data.attributes.name }}</h1> -
|
||||
<div class="col flex-center">
|
||||
<h1>{{ data.attributes.name }}</h1>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="artist-body">
|
||||
<template v-if="data.views && data.views['latest-releases']">
|
||||
<template v-if="data.relationships && data.relationships['shared-playlists']">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3>{{ data.views["latest-releases"].attributes.title ?? ""}}</h3>
|
||||
<h3>{{ 'Shared Playlists' ?? ""}}</h3>
|
||||
</div>
|
||||
<div class="col-auto flex-center" v-if="data.views['latest-releases'].data.length >= 10">
|
||||
<button class="cd-btn-seeall" @click="app.showRecordLabelView(data.id, data.attributes.name + ' - Latest Releases', 'latest-releases')">{{app.getLz('term.seeAll')}}</button>
|
||||
<div class="col-auto flex-center" v-if="data.relationships['shared-playlists'].data.length >= 10">
|
||||
<button class="cd-btn-seeall" @click="app.showCollection(data.relationships['shared-playlists'],'Shared Playlists' ?? '', 'default')">{{app.getLz('term.seeAll')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<mediaitem-square :item="item" v-for="item in data.views['latest-releases'].data">
|
||||
</mediaitem-square>
|
||||
</template>
|
||||
<template v-if="data.views && data.views['top-releases']">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3>{{ data.views["top-releases"].attributes.title ?? ""}}</h3>
|
||||
</div>
|
||||
<div class="col-auto flex-center" v-if="data.views['top-releases'].data.length >= 10">
|
||||
<button class="cd-btn-seeall" @click="app.showRecordLabelView(data.id, data.attributes.name + ' - Top Releases', 'top-releases')">{{app.getLz('term.seeAll')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<mediaitem-square :item="item" v-for="item in data.views['top-releases'].data">
|
||||
</mediaitem-square>
|
||||
</template>
|
||||
<template v-if="data.relationships && data.relationships.playlists && data.relationships.playlists.data.length > 0">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3>Playlists</h3>
|
||||
</div>
|
||||
<div class="col-auto flex-center" v-if="data.relationships.playlists.data.length >= 5">
|
||||
<button class="cd-btn-seeall" @click="app.showCollection(data.relationships.playlists, data.attributes.name + ' - Playlists', 'curator')">{{app.getLz('term.seeAll')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<mediaitem-square :item="item" v-for="item in data.relationships.playlists.data.limit(5)">
|
||||
<mediaitem-square :item="item" v-for="item in data.relationships['shared-playlists'].data.limit(10)">
|
||||
</mediaitem-square>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
Vue.component('cider-recordlabel', {
|
||||
template: "#cider-recordlabel",
|
||||
Vue.component('cider-socialprofile', {
|
||||
template: "#cider-socialprofile",
|
||||
props: ['data'],
|
||||
data: function () {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue