some fixes
This commit is contained in:
parent
5421e91cd1
commit
6a175e2944
2 changed files with 15 additions and 4 deletions
|
@ -1695,7 +1695,7 @@ const app = new Vue({
|
||||||
});
|
});
|
||||||
window.location.hash = `${kind}/${id}`
|
window.location.hash = `${kind}/${id}`
|
||||||
document.querySelector("#app-content").scrollTop = 0
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
} else if (kind == "editorial-elements") {
|
} else if (kind == "editorial-elements" || kind == "editorial-items") {
|
||||||
console.debug(item)
|
console.debug(item)
|
||||||
if (item.relationships?.contents?.data != null && item.relationships?.contents?.data.length > 0) {
|
if (item.relationships?.contents?.data != null && item.relationships?.contents?.data.length > 0) {
|
||||||
this.routeView(item.relationships.contents.data[0])
|
this.routeView(item.relationships.contents.data[0])
|
||||||
|
@ -1717,6 +1717,15 @@ const app = new Vue({
|
||||||
window.open(item.attributes.link.url)}
|
window.open(item.attributes.link.url)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if (kind == "multirooms"){
|
||||||
|
app.getTypeFromID("multiroom", id, false, {
|
||||||
|
platform: "web",
|
||||||
|
extend: "editorialArtwork,uber,lockupStyle"
|
||||||
|
}).then(()=> {
|
||||||
|
kind = "multiroom"
|
||||||
|
window.location.hash = `${kind}/${id}`
|
||||||
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
|
})
|
||||||
} else if (kind.toString().includes("artist")) {
|
} else if (kind.toString().includes("artist")) {
|
||||||
app.getArtistInfo(id, isLibrary)
|
app.getArtistInfo(id, isLibrary)
|
||||||
window.location.hash = `${kind}/${id}${isLibrary ? "/" + isLibrary : ''}`
|
window.location.hash = `${kind}/${id}${isLibrary ? "/" + isLibrary : ''}`
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-rect" :class="{'info-rect-card': kind == 'card'}" :style="{'--bgartwork': getArtworkUrl(size, true)}">
|
<div class="info-rect" :class="{'info-rect-card': kind == 'card'}" :style="{'--bgartwork': getArtworkUrl(size, true)}">
|
||||||
<div class="title" :title="item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? '')" v-if="item.attributes.artistNames == null || kind!= 'card'" @click='app.routeView(item)'>
|
<div class="title" :title="item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? ( item.attributes?.editorialNotes?.name ?? ''))" v-if="item.attributes.artistNames == null || kind!= 'card'|| kind!= 'editorial-items'" @click='app.routeView(item)'>
|
||||||
<div class="item-navigate text-overflow-elipsis">{{ item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? '') }}</div>
|
<div class="item-navigate text-overflow-elipsis">{{ item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? '') }}</div>
|
||||||
<div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'" style= "background-image: url(./assets/explicit.svg);height: 12px;width: 12px;filter: contrast(0);background-repeat: no-repeat;margin-top: 2.63px;margin-left: 4px;"></div>
|
<div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'" style= "background-image: url(./assets/explicit.svg);height: 12px;width: 12px;filter: contrast(0);background-repeat: no-repeat;margin-top: 2.63px;margin-left: 4px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||||
return this.item.attributes.artistNames
|
return this.item.attributes.artistNames
|
||||||
} else if (typeof this.item.attributes.editorialNotes != "undefined") {
|
} else if (typeof this.item.attributes.editorialNotes != "undefined") {
|
||||||
return this.item.attributes.editorialNotes.short
|
return this.item?.attributes?.editorialNotes?.short ?? (this.item.attributes?.editorialNotes?.name ?? '')
|
||||||
} else if (typeof this.item.attributes.artistName != "undefined") {
|
} else if (typeof this.item.attributes.artistName != "undefined") {
|
||||||
return this.item.attributes.artistName
|
return this.item.attributes.artistName
|
||||||
} else {
|
} else {
|
||||||
|
@ -137,6 +137,8 @@
|
||||||
} else {
|
} else {
|
||||||
if (typeof this.item.attributes.artistName != "undefined") {
|
if (typeof this.item.attributes.artistName != "undefined") {
|
||||||
return this.item.attributes.artistName
|
return this.item.attributes.artistName
|
||||||
|
} else if (typeof this.item.attributes.editorialNotes != "undefined") {
|
||||||
|
return this.item?.attributes?.editorialNotes?.short ?? (this.item.attributes?.editorialNotes?.name ?? '')
|
||||||
} else {
|
} else {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
@ -227,7 +229,7 @@
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
getArtworkUrl(size = -1, includeUrl = false) {
|
getArtworkUrl(size = -1, includeUrl = false) {
|
||||||
let artwork = this.item.attributes.artwork ? this.item.attributes.artwork.url : ''
|
let artwork = this.item?.attributes?.artwork ? this.item?.attributes?.artwork?.url : (this.item?.attributes?.editorialArtwork?.subscriptionCover?.url ?? '')
|
||||||
if (size != -1) {
|
if (size != -1) {
|
||||||
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', ((size === 900) ? "sr" : "cc"))
|
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', ((size === 900) ? "sr" : "cc"))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue