@ -1,6 +1,21 @@
< template >
< transition name = "slide-up" >
< div class = "lyrics-page" : class = "{ 'no-lyric': noLyric }" >
< div
v - if = "this.$store.state.settings.showLyricsDynamicBackground"
class = "dynamic-background"
>
< div v-show ="this.$store.state.showLyrics" >
< div
class = "top-right"
: style = "{ backgroundImage: `url(${imageUrl})` }"
/ >
< div
class = "bottom-left"
: style = "{ backgroundImage: `url(${imageUrl})` }"
/ >
< / div >
< / div >
< div class = "left-side" >
< div >
< div class = "cover" >
@ -15,37 +30,39 @@
< div class = "controls" >
< div class = "top-part" >
< div class = "track-info" >
< div class = "title" :title ="currentTrack.name"
> < router -link
< div class = "title" :title ="currentTrack.name" >
< router -link
: to = "`/${player.playlistSource.type}/${player.playlistSource.id}`"
@ click . native = "toggleLyrics"
> { { currentTrack . name } } < / r o u t e r - l i n k
>< / d i v
>
< div class = "subtitle"
> < router -link
> { { currentTrack . name } }
</ r o u t e r - l i n k >
< / div >
< div class = "subtitle" >
< router -link
: to = "`/artist/${currentTrack.ar[0].id}`"
@ click . native = "toggleLyrics"
> { { currentTrack . ar [ 0 ] . name } } < / r o u t e r - l i n k
>
> { { currentTrack . ar [ 0 ] . name } }
</ r o u t e r - l i n k >
-
< router -link
: to = "`/album/${currentTrack.al.id}`"
@ click . native = "toggleLyrics"
: title = "currentTrack.al.name"
> { { currentTrack . al . name } } < / r o u t e r - l i n k
>< / d i v
>
> { { currentTrack . al . name } }
</ r o u t e r - l i n k >
< / div >
< / div >
< div class = "buttons" >
< button -icon
@ click . native = "playerRef.likeCurrentSong"
: title = "$t('player.like')"
> < svg -icon
>
< svg -icon
: icon - class = "
playerRef . isCurrentTrackLiked ? 'heart-solid' : 'heart'
"
/ > < / b u t t o n - i c o n >
/ >
< / b u t t o n - i c o n >
<!-- < button -icon @click.native ="openMenu" title = "Menu"
> < svg -icon icon -class = " more "
/ > < / b u t t o n - i c o n > - - >
@ -66,8 +83,8 @@
: tooltipFormatter = "formatTrackTime"
@ drag - end = "setSeek"
ref = "progress"
> < / v u e - s l i d e r
> < / div >
> < / v u e - s l i d e r >
< / div >
< span > { { formatTrackTime ( progressMax ) } } < / span >
< / div >
< div class = "media-controls" >
@ -95,33 +112,40 @@
v - show = "!player.isPersonalFM"
@ click . native = "playerRef.previous"
: title = "$t('player.previous')"
> < svg -icon icon -class = " previous "
/ > < / b u t t o n - i c o n >
>
< svg -icon icon -class = " previous " / >
< / b u t t o n - i c o n >
< button -icon
v - show = "player.isPersonalFM"
@ click . native = "moveToFMTrash"
title = "不喜欢"
> < svg -icon icon -class = " thumbs -down "
/ > < / b u t t o n - i c o n >
>
< svg -icon icon -class = " thumbs -down " / >
< / b u t t o n - i c o n >
< button -icon
id = "play"
@ click . native = "playerRef.play"
: title = "$t(player.playing ? 'player.pause' : 'player.play')"
> < svg -icon : icon -class = " playerRef.playing ? ' pause ' : ' play ' "
/ > < / b u t t o n - i c o n >
>
< svg -icon
: icon - class = "playerRef.playing ? 'pause' : 'play'"
/ >
< / b u t t o n - i c o n >
< button -icon
@ click . native = "playerRef.next"
: title = "$t('player.next')"
> < svg -icon icon -class = " next "
/ > < / b u t t o n - i c o n >
>
< svg -icon icon -class = " next " / >
< / b u t t o n - i c o n >
< / div >
< button -icon
v - show = "!player.isPersonalFM"
@ click . native = "playerRef.shuffle"
: title = "$t('player.shuffle')"
: class = "{ active: player.shuffle }"
> < svg -icon icon -class = " shuffle "
/ > < / b u t t o n - i c o n >
>
< svg -icon icon -class = " shuffle " / >
< / b u t t o n - i c o n >
< / div >
< / div >
< / div >
@ -150,7 +174,9 @@
< / transition >
< / div >
< div class = "close-button" @click ="toggleLyrics" >
< button > < svg -icon icon -class = " arrow -down " / > < / button >
< button >
< svg -icon icon -class = " arrow -down " / >
< / button >
< / div >
< / div >
< / transition >
@ -346,6 +372,52 @@ export default {
display : flex ;
}
. dynamic - background {
-- contrast - dynamic - background : 75 % ;
-- brightness - dynamic - background : 150 % ;
}
[ data - theme = "dark" ] . dynamic - background {
-- contrast - dynamic - background : 125 % ;
-- brightness - dynamic - background : 50 % ;
}
. dynamic - background {
. top - right ,
. bottom - left {
z - index : 0 ;
width : 140 vw ;
height : 140 vw ;
position : absolute ;
filter : blur ( 50 px ) opacity ( 0.6 ) contrast ( var ( -- contrast - dynamic - background ) )
brightness ( var ( -- brightness - dynamic - background ) ) ;
background - size : cover ;
animation : rotate 150 s linear infinite ;
}
. top - right {
right : 0 ;
top : 0 ;
mix - blend - mode : luminosity ;
}
. bottom - left {
left : 0 ;
bottom : 0 ;
animation - direction : reverse ;
animation - delay : 10 s ;
}
}
@ keyframes rotate {
0 % {
transform : rotate ( 0 deg ) ;
}
100 % {
transform : rotate ( 360 deg ) ;
}
}
. left - side {
flex : 1 ;
display : flex ;
@ -354,10 +426,12 @@ export default {
margin - top : 24 px ;
align - items : center ;
transition : all 0.5 s ;
. controls {
max - width : 54 vh ;
margin - top : 24 px ;
color : var ( -- color - text ) ;
. title {
margin - top : 8 px ;
font - size : 1.4 rem ;
@ -368,6 +442,7 @@ export default {
- webkit - line - clamp : 1 ;
overflow : hidden ;
}
. subtitle {
margin - top : 4 px ;
font - size : 1 rem ;
@ -381,12 +456,15 @@ export default {
. top - part {
display : flex ;
justify - content : space - between ;
. buttons {
display : flex ;
align - items : center ;
button {
margin : 0 0 0 4 px ;
}
. svg - icon {
opacity : 0.58 ;
height : 18 px ;
@ -394,50 +472,61 @@ export default {
}
}
}
. progress - bar {
margin - top : 22 px ;
display : flex ;
align - items : center ;
justify - content : space - between ;
. slider {
width : 100 % ;
flex - grow : grow ;
padding : 0 10 px ;
}
span {
font - size : 15 px ;
opacity : 0.58 ;
min - width : 28 px ;
}
}
. media - controls {
display : flex ;
justify - content : center ;
margin - top : 18 px ;
align - items : center ;
button {
margin : 0 ;
}
. svg - icon {
opacity : 0.38 ;
height : 14 px ;
width : 14 px ;
}
. active . svg - icon {
opacity : 0.88 ;
}
. middle {
padding : 0 16 px ;
display : flex ;
align - items : center ;
button {
margin : 0 8 px ;
}
button # play . svg - icon {
height : 28 px ;
width : 28 px ;
padding : 2 px ;
}
. svg - icon {
opacity : 0.88 ;
height : 22 px ;
@ -454,6 +543,7 @@ export default {
. cover - container {
position : relative ;
}
img {
border - radius : 0.75 em ;
width : 54 vh ;
@ -461,6 +551,7 @@ export default {
user - select : none ;
object - fit : cover ;
}
. shadow {
position : absolute ;
top : 12 px ;
@ -479,6 +570,7 @@ export default {
font - weight : 600 ;
color : var ( -- color - text ) ;
margin - right : 24 px ;
. lyrics - container {
height : 100 % ;
display : flex ;
@ -487,32 +579,40 @@ export default {
max - width : 460 px ;
overflow - y : auto ;
transition : 0.5 s ;
. line {
padding : 18 px ;
transition : 0.2 s ;
border - radius : 12 px ;
& : hover {
background : var ( -- color - secondary - bg ) ;
}
span {
opacity : 0.28 ;
cursor : default ;
}
}
. line # line - 1 : hover {
background : unset ;
}
. highlight span {
opacity : 0.98 ;
transition : 0.5 s ;
}
}
: : - webkit - scrollbar {
display : none ;
}
. lyrics - container . line : first - child {
margin - top : 50 vh ;
}
. lyrics - container . line : last - child {
margin - bottom : calc ( 50 vh - 128 px ) ;
}
@ -532,14 +632,16 @@ export default {
opacity : 0.28 ;
transition : 0.2 s ;
- webkit - app - region : no - drag ;
. svg - icon {
color : var ( -- color - text ) ;
padding - top : 5 px ;
height : 22 px ;
width : 22 px ;
}
& : hover {
background : var ( -- color - secondary - bg ) ;
background : var ( -- color - secondary - bg - for - transparent ) ;
opacity : 0.88 ;
}
}
@ -556,6 +658,7 @@ export default {
. slide - up - leave - active {
transition : all 0.4 s ;
}
. slide - up - enter , . slide - up - leave - to /* .fade-leave-active below version 2.1.8 */ {
transform : translateY ( 100 % ) ;
}
@ -563,9 +666,11 @@ export default {
. slide - fade - enter - active {
transition : all 0.5 s ease ;
}
. slide - fade - leave - active {
transition : all 0.5 s cubic - bezier ( 0.2 , 0.2 , 0 , 1 ) ;
}
. slide - fade - enter ,
. slide - fade - leave - to {
transform : translateX ( 27 vh ) ;