refactor: change the style of playing track

master
qier222 4 years ago
parent 281f9fe0bc
commit 650684de47

@ -7,16 +7,22 @@
@mouseover="focus = true" @mouseover="focus = true"
@mouseleave="focus = false" @mouseleave="focus = false"
> >
<img :src="imgUrl | resizeImage(224)" v-if="!isAlbum" @click="goToAlbum" /> <img
:src="imgUrl | resizeImage(224)"
v-if="!isAlbum"
@click="goToAlbum"
:class="{ hover: focus }"
/>
<div class="no" v-if="isAlbum"> <div class="no" v-if="isAlbum">
<button <button v-show="focus && track.playable && !isPlaying" @click="playTrack">
class="play-button" <svg-icon icon-class="play" style="height:14px;width:14px"></svg-icon>
v-show="focus && track.playable" </button>
@click="playTrack" <span v-show="(!focus || !track.playable) && !isPlaying">{{
> track.no
<svg-icon icon-class="play"></svg-icon> }}</span>
<button v-show="isPlaying">
<svg-icon icon-class="volume" style="height:16px;width:16px"></svg-icon>
</button> </button>
<span v-show="!focus || !track.playable">{{ track.no }}</span>
</div> </div>
<div class="title-and-artist"> <div class="title-and-artist">
<div class="container"> <div class="container">
@ -156,15 +162,6 @@ button {
} }
} }
button.play-button {
opacity: 1;
.svg-icon {
height: 14px;
width: 14px;
color: #335eea;
}
}
.track { .track {
display: flex; display: flex;
align-items: center; align-items: center;
@ -205,6 +202,11 @@ button.play-button {
border: 1px solid rgba(0, 0, 0, 0.04); border: 1px solid rgba(0, 0, 0, 0.04);
cursor: pointer; cursor: pointer;
} }
img.hover {
filter: drop-shadow(100 200 0 black);
}
.title-and-artist { .title-and-artist {
flex: 1; flex: 1;
display: flex; display: flex;
@ -282,6 +284,7 @@ button.play-button {
.artist, .artist,
.album, .album,
.time, .time,
.no,
.featured { .featured {
color: rgba(0, 0, 0, 0.28) !important; color: rgba(0, 0, 0, 0.28) !important;
} }

Loading…
Cancel
Save