diff --git a/src/components/player/PlayerBar.tsx b/src/components/player/PlayerBar.tsx index e5a4266..972bf18 100644 --- a/src/components/player/PlayerBar.tsx +++ b/src/components/player/PlayerBar.tsx @@ -87,7 +87,7 @@ const PlayerBar = () => { } settings.setSync('volume', localVolume); } - setIsDragging(false); + setIsDraggingVolume(false); }, 10); return () => clearTimeout(debounce); @@ -567,6 +567,7 @@ const PlayerBar = () => { progress defaultValue={0} value={isDragging ? manualSeek : seek} + $isDragging={isDragging} tooltip={false} max={ playQueue[currentEntryList][playQueue.currentIndex] @@ -721,6 +722,7 @@ const PlayerBar = () => { tabIndex={0} progress value={Math.floor(localVolume * 100)} + $isDragging={isDraggingVolume} tooltip={false} style={{ width: '100px', marginRight: '10px' }} onChange={handleVolumeSlider} diff --git a/src/components/player/styled.tsx b/src/components/player/styled.tsx index f4cbc44..7c8bcae 100644 --- a/src/components/player/styled.tsx +++ b/src/components/player/styled.tsx @@ -70,16 +70,24 @@ export const LinkButton = styled.a<{ subtitle?: string }>` } `; -export const CustomSlider = styled(Slider)` - .rs-slider-progress-bar { - background-color: ${(props) => props.theme.primary.sliderBackground}; +export const CustomSlider = styled(Slider)<{ isDragging?: boolean }>` + &:hover { + .rs-slider-handle::before { + display: block; + } + .rs-slider-progress-bar { + background-color: ${(props) => props.theme.primary.main}; + } } - - .rs-slider-progress-bar::hover { - background-color: #ff0 !important; + .rs-slider-progress-bar { + background-color: ${(props) => + props.$isDragging + ? props.theme.primary.main + : props.theme.primary.sliderBackground}; } .rs-slider-handle::before { + display: none; border: ${(props) => `1px solid ${props.theme.primary.main} !important`}; } `;