mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
add touch effect
This commit is contained in:
parent
4add14652c
commit
a009829688
@ -25,6 +25,7 @@ const handlers = {
|
|||||||
|
|
||||||
const Track = (props) => {
|
const Track = (props) => {
|
||||||
const {
|
const {
|
||||||
|
loading,
|
||||||
track_manifest,
|
track_manifest,
|
||||||
playback_status,
|
playback_status,
|
||||||
} = React.useContext(PlayerContext)
|
} = React.useContext(PlayerContext)
|
||||||
@ -139,6 +140,7 @@ const Track = (props) => {
|
|||||||
{
|
{
|
||||||
["current"]: isCurrent,
|
["current"]: isCurrent,
|
||||||
["playing"]: isPlaying,
|
["playing"]: isPlaying,
|
||||||
|
["loading"]: isCurrent && loading
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
|
@ -1,3 +1,27 @@
|
|||||||
|
html {
|
||||||
|
&.mobile {
|
||||||
|
.music-track {
|
||||||
|
&:active {
|
||||||
|
animation: press 150ms ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.loading {
|
||||||
|
// TODO: create a bottom line svg to animate stroke width
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes press {
|
||||||
|
0% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.music-track {
|
.music-track {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@ -9,6 +33,8 @@
|
|||||||
|
|
||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
|
|
||||||
|
transition: all 150ms ease-in-out;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.music-track_actions {
|
.music-track_actions {
|
||||||
&.withOrder {
|
&.withOrder {
|
||||||
@ -45,7 +71,6 @@
|
|||||||
linear-gradient(to right, rgba(var(--cover_average-color)), transparent),
|
linear-gradient(to right, rgba(var(--cover_average-color)), transparent),
|
||||||
url(https://grainy-gradients.vercel.app/noise.svg);
|
url(https://grainy-gradients.vercel.app/noise.svg);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.music-track_background {
|
.music-track_background {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user