added indicator for unavailable mediaitems

This commit is contained in:
booploops 2022-02-24 01:06:23 -08:00
parent 211497b32f
commit eb97c01536
2 changed files with 37 additions and 1 deletions

View file

@ -965,6 +965,29 @@
font-size: 12px; font-size: 12px;
} }
.unavailable-overlay {
position: absolute;
top: 0px;
left: 0px;
bottom: 0;
right: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 2;
pointer-events: none;
background: rgb(0 0 0 / 40%);
margin: 2em;
border-radius: 10px;
>.codicon {
font-size: 4em;
font-weight: bold;
opacity: 0.5;
}
}
&.mediaitem-video { &.mediaitem-video {
height: 200px; height: 200px;
width: 240px; width: 240px;

View file

@ -5,6 +5,9 @@
:style="{'--spcolor': getBgColor()}"> :style="{'--spcolor': getBgColor()}">
<template v-if="isVisible"> <template v-if="isVisible">
<div class="artwork-container"> <div class="artwork-container">
<div class="unavailable-overlay" v-if="unavailable">
<div class="codicon codicon-circle-slash"></div>
</div>
<div class="artwork" @click='app.routeView(item)'> <div class="artwork" @click='app.routeView(item)'>
<mediaitem-artwork <mediaitem-artwork
:url="getArtworkUrl()" :url="getArtworkUrl()"
@ -73,11 +76,21 @@
nomenu: ["artists", "stations", "apple-curators"], nomenu: ["artists", "stations", "apple-curators"],
app: this.$root, app: this.$root,
badges: this.$root.socialBadges.badgeMap, badges: this.$root.socialBadges.badgeMap,
itemBadges: [] itemBadges: [],
unavailable: false
} }
}, },
async mounted() { async mounted() {
await this.getBadges() await this.getBadges()
if(typeof this.item.attributes.playParams == "object") {
if(this.item.attributes.playParams.kind.includes("radioStation") && this.item.attributes.requiresSubscription) {
this.unavailable = true
}
}else{
if(this.item.type == "music-movies") {
this.unavailable = true
}
}
}, },
methods: { methods: {
getBgColor() { getBgColor() {