added artwork fade in
This commit is contained in:
parent
d7b314e0f5
commit
a16cb05c1e
2 changed files with 16 additions and 4 deletions
|
@ -1,9 +1,10 @@
|
|||
<script type="text/x-template" id="mediaitem-artwork">
|
||||
<div class="mediaitem-artwork" @contextmenu="contextMenu" :class="[{'rounded': (type == 'artists')}, classes]" :key="url">
|
||||
<div class="mediaitem-artwork" :style="awStyle" @contextmenu="contextMenu" :class="[{'rounded': (type == 'artists')}, classes]" :key="url">
|
||||
<img :src="app.getMediaItemArtwork(url, size, width)"
|
||||
decoding="async"
|
||||
loading="lazy"
|
||||
:style="{background: bgcolor}"
|
||||
:style="imgStyle"
|
||||
@load="imgLoaded()"
|
||||
class="mediaitem-artwork--img">
|
||||
<div v-if="video && getVideoPriority()" class="animatedartwork-view-box">
|
||||
<animatedartwork-view :priority="getVideoPriority()" :video="video"></animatedartwork-view>
|
||||
|
@ -50,11 +51,18 @@
|
|||
},
|
||||
data: function () {
|
||||
return {
|
||||
app:this.$root,
|
||||
app: this.$root,
|
||||
isVisible: false,
|
||||
style: {
|
||||
"box-shadow": ""
|
||||
},
|
||||
awStyle: {
|
||||
background: this.bgcolor
|
||||
},
|
||||
imgStyle: {
|
||||
opacity: 0,
|
||||
transition: "opacity .25s linear"
|
||||
},
|
||||
classes: []
|
||||
}
|
||||
},
|
||||
|
@ -62,6 +70,10 @@
|
|||
this.getClasses()
|
||||
},
|
||||
methods: {
|
||||
imgLoaded() {
|
||||
this.imgStyle.opacity = 1
|
||||
// this.awStyle.background = ""
|
||||
},
|
||||
contextMenu(event) {
|
||||
let self = this
|
||||
app.showMenuPanel({
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<% } %>
|
||||
|
||||
|
||||
<script async src="https://js-cdn.music.apple.com/musickit/v3/amp/musickit.js"></script>
|
||||
<script async src="https://js-cdn.music.apple.com/musickit/v3/amp/musickit.js" data-web-components></script>
|
||||
<script src="index.js?v=1"></script>
|
||||
|
||||
<script type="text/x-template" id="am-musiccovershelf">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue