@@ -8,6 +8,14 @@ import { useSelector } from 'react-redux';
88import player from '../lib/player' ;
99import { durationToHHMMSS , removeLeadingZero , splitShowDate } from '../lib/utils' ;
1010import Flex from './Flex' ;
11+ import {
12+ ChevronDown ,
13+ FastForwardIcon ,
14+ ListMusicIcon ,
15+ PauseIcon ,
16+ PlayIcon ,
17+ RewindIcon ,
18+ } from 'lucide-react' ;
1119
1220interface Props {
1321 artistSlugsToName : Record < string , string | undefined > ;
@@ -77,24 +85,25 @@ const Player = ({ artistSlugsToName }: Props) => {
7785 ) }
7886 { activeTrack && (
7987 < Flex
80- className = "playpause cursor-pointer items-center justify-center text-gray-600 active:text-gray-800 lg:w-[50px ]"
88+ className = "playpause cursor-pointer items-center justify-center text-gray-600 active:text-gray-800 lg:w-[40px ]"
8189 onClick = { ( ) => player . togglePlayPause ( ) }
8290 >
83- < i
84- className = { `fas fa cursor-pointer fa- ${
85- playback . activeTrack . isPaused ? 'play' : 'pause'
86- } ` }
87- />
91+ { playback . activeTrack . isPaused ? (
92+ < PlayIcon size = { 20 } className = "fill-gray-600 active:fill-gray-800" />
93+ ) : (
94+ < PauseIcon size = { 20 } className = "fill-gray-600 active:fill-gray-800" />
95+ ) }
8896 </ Flex >
8997 ) }
9098 { typeof window === 'undefined' || ! activeTrack ? null : (
9199 < div className = "relative h-full flex-1" ref = { playerRef } >
92100 < Flex className = "info h-full justify-center transition-all duration-[1s] ease-in-out" >
93101 < div className = "timing absolute left-[8px] top-1/2 translate-x-0 translate-y-[-50%] text-left text-[0.8em] text-gray-600" >
94102 < div >
95- < i
96- className = "fa fa-backward cursor-pointer"
103+ < RewindIcon
104+ className = "cursor-pointer fill-gray-600 "
97105 onClick = { ( ) => player . playPrevious ( ) }
106+ size = { 16 }
98107 />
99108 </ div >
100109 < div > { durationToHHMMSS ( playback . activeTrack . currentTime ) } </ div >
@@ -105,7 +114,7 @@ const Player = ({ artistSlugsToName }: Props) => {
105114 { false && (
106115 < Flex className = "absolute left-full top-[2px] ml-2 w-full items-center text-[0.8em] text-gray-600" >
107116 < div > Next: { nextTrack && nextTrack . title } </ div >
108- < i className = "fa fa-angle-down cursor-pointer" />
117+ < ChevronDown size = { 12 } className = "cursor-pointer" />
109118 </ Flex >
110119 ) }
111120 </ div >
@@ -122,7 +131,11 @@ const Player = ({ artistSlugsToName }: Props) => {
122131 </ Flex >
123132 < div className = "timing duration absolute right-[8px] top-1/2 translate-x-0 translate-y-[-50%] text-right text-[0.8em] text-gray-600" >
124133 < div >
125- < i className = "fa fa-forward cursor-pointer" onClick = { ( ) => player . playNext ( ) } />
134+ < FastForwardIcon
135+ className = "ml-auto cursor-pointer fill-gray-600"
136+ onClick = { ( ) => player . playNext ( ) }
137+ size = { 16 }
138+ />
126139 </ div >
127140 < div onClick = { toggleRemainingDuration } className = "cursor-pointer" >
128141 { durationToHHMMSS (
@@ -134,7 +147,7 @@ const Player = ({ artistSlugsToName }: Props) => {
134147 </ div >
135148 </ Flex >
136149 < div
137- className = "absolute bottom-0 left-0 z-[1] h-1 w-full cursor-pointer bg-[#bcbcbc]"
150+ className = "z-1 absolute bottom-0 left-0 h-1 w-full cursor-pointer bg-[#bcbcbc]"
138151 onClick = { onProgressClick }
139152 style = { { opacity : playback . activeTrack . currentTime < 0.1 ? 0.8 : 1 } }
140153 >
@@ -143,12 +156,12 @@ const Player = ({ artistSlugsToName }: Props) => {
143156 style = { { width : notchPosition ? notchPosition + 2 : 'auto' } }
144157 />
145158 < div
146- className = "absolute bottom-0 left-0 z-[1] h-2 w-[3px] bg-black"
159+ className = "z-1 absolute bottom-0 left-0 h-2 w-[3px] bg-black"
147160 style = { { transform : `translate(${ notchPosition } px, 0)` } }
148161 />
149162 </ div >
150163 < div
151- className = "absolute right-[-6px] top-0 h-full w-[6px] bg-[#0000001a]"
164+ className = "absolute right-[-6px] top-0 h-full w-[6px] cursor-pointer bg-[#0000001a]"
152165 onClick = { updateVolume }
153166 >
154167 < div
@@ -166,8 +179,8 @@ const Player = ({ artistSlugsToName }: Props) => {
166179 as = { `/${ artistSlug } /${ year } /${ month } /${ day } ?source=${ source } ` }
167180 legacyBehavior
168181 >
169- < div className = "w-[50px ] cursor-pointer items-center justify-center self-center text-gray-600 active:text-gray-800 max-lg:hidden" >
170- < i className = "fa fa fa-list-ol cursor-pointer" />
182+ < div className = "flex w-[40px ] cursor-pointer items-center justify-center self-center text-gray-600 active:text-gray-800 max-lg:hidden" >
183+ < ListMusicIcon size = { 22 } />
171184 </ div >
172185 </ Link >
173186 ) }
0 commit comments