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">
|
<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)"
|
<img :src="app.getMediaItemArtwork(url, size, width)"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
:style="{background: bgcolor}"
|
:style="imgStyle"
|
||||||
|
@load="imgLoaded()"
|
||||||
class="mediaitem-artwork--img">
|
class="mediaitem-artwork--img">
|
||||||
<div v-if="video && getVideoPriority()" class="animatedartwork-view-box">
|
<div v-if="video && getVideoPriority()" class="animatedartwork-view-box">
|
||||||
<animatedartwork-view :priority="getVideoPriority()" :video="video"></animatedartwork-view>
|
<animatedartwork-view :priority="getVideoPriority()" :video="video"></animatedartwork-view>
|
||||||
|
@ -55,6 +56,13 @@
|
||||||
style: {
|
style: {
|
||||||
"box-shadow": ""
|
"box-shadow": ""
|
||||||
},
|
},
|
||||||
|
awStyle: {
|
||||||
|
background: this.bgcolor
|
||||||
|
},
|
||||||
|
imgStyle: {
|
||||||
|
opacity: 0,
|
||||||
|
transition: "opacity .25s linear"
|
||||||
|
},
|
||||||
classes: []
|
classes: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -62,6 +70,10 @@
|
||||||
this.getClasses()
|
this.getClasses()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
imgLoaded() {
|
||||||
|
this.imgStyle.opacity = 1
|
||||||
|
// this.awStyle.background = ""
|
||||||
|
},
|
||||||
contextMenu(event) {
|
contextMenu(event) {
|
||||||
let self = this
|
let self = this
|
||||||
app.showMenuPanel({
|
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 src="index.js?v=1"></script>
|
||||||
|
|
||||||
<script type="text/x-template" id="am-musiccovershelf">
|
<script type="text/x-template" id="am-musiccovershelf">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue