From 78d42923683f50429bae6f376336f37ba7237ebb Mon Sep 17 00:00:00 2001 From: jinhojang6 Date: Thu, 24 Aug 2023 03:40:20 +0900 Subject: [PATCH] style: update simplecast player design --- .../Header/Episode.SimplecastPlayer.tsx | 1 + .../Icons/FullscreenIcon/FullscreenIcon.tsx | 27 +++++++++++++++++++ src/components/Icons/FullscreenIcon/index.ts | 1 + src/components/Icons/MuteIcon/MuteIcon.tsx | 17 +++++++----- .../Icons/VolumeIcon/VolumeIcon.tsx | 22 ++++++++++----- .../LpePlayer/Controls/Controls.tsx | 25 ++++++++++++----- 6 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 src/components/Icons/FullscreenIcon/FullscreenIcon.tsx create mode 100644 src/components/Icons/FullscreenIcon/index.ts diff --git a/src/components/Episode/Header/Episode.SimplecastPlayer.tsx b/src/components/Episode/Header/Episode.SimplecastPlayer.tsx index ee986a7..fd90e24 100644 --- a/src/components/Episode/Header/Episode.SimplecastPlayer.tsx +++ b/src/components/Episode/Header/Episode.SimplecastPlayer.tsx @@ -80,6 +80,7 @@ const SimplecastPlayer = ({ onMouseUp: handleSeekMouseUp, onMouseDown: handleSeekMouseDown, }} + allowFullScreen={true} color={'white'} /> diff --git a/src/components/Icons/FullscreenIcon/FullscreenIcon.tsx b/src/components/Icons/FullscreenIcon/FullscreenIcon.tsx new file mode 100644 index 0000000..ac62645 --- /dev/null +++ b/src/components/Icons/FullscreenIcon/FullscreenIcon.tsx @@ -0,0 +1,27 @@ +import { LsdIcon } from '@acid-info/lsd-react' + +export const FullscreenIcon = LsdIcon( + (props) => ( + + + + + + + + + + + ), + { filled: true }, +) diff --git a/src/components/Icons/FullscreenIcon/index.ts b/src/components/Icons/FullscreenIcon/index.ts new file mode 100644 index 0000000..ed19f1b --- /dev/null +++ b/src/components/Icons/FullscreenIcon/index.ts @@ -0,0 +1 @@ +export * from './FullscreenIcon' diff --git a/src/components/Icons/MuteIcon/MuteIcon.tsx b/src/components/Icons/MuteIcon/MuteIcon.tsx index 6f08732..c0e3c55 100644 --- a/src/components/Icons/MuteIcon/MuteIcon.tsx +++ b/src/components/Icons/MuteIcon/MuteIcon.tsx @@ -3,17 +3,20 @@ import { LsdIcon } from '@acid-info/lsd-react' export const MuteIcon = LsdIcon( (props) => ( - + + + ), { filled: true }, diff --git a/src/components/Icons/VolumeIcon/VolumeIcon.tsx b/src/components/Icons/VolumeIcon/VolumeIcon.tsx index 4916435..f514c6f 100644 --- a/src/components/Icons/VolumeIcon/VolumeIcon.tsx +++ b/src/components/Icons/VolumeIcon/VolumeIcon.tsx @@ -3,16 +3,24 @@ import { LsdIcon } from '@acid-info/lsd-react' export const VolumeIcon = LsdIcon( (props) => ( - + + + + + + + + ), { filled: true }, diff --git a/src/components/LpePlayer/Controls/Controls.tsx b/src/components/LpePlayer/Controls/Controls.tsx index e009e3b..23645c0 100644 --- a/src/components/LpePlayer/Controls/Controls.tsx +++ b/src/components/LpePlayer/Controls/Controls.tsx @@ -11,6 +11,7 @@ import { ControlsTimeTrackProps, TimeTrack, } from '@/components/LpePlayer/Controls/Controls.TimeTrack' +import { FullscreenIcon } from '@/components/Icons/FullscreenIcon' export interface LpeAudioPlayerControlsProps { duration: number @@ -21,7 +22,7 @@ export interface LpeAudioPlayerControlsProps { onPause: () => void onPlay: () => void onVolumeToggle: () => void - + allowFullScreen?: boolean color?: string timeTrackProps: ControlsTimeTrackProps @@ -38,6 +39,7 @@ export const LpeAudioPlayerControls = (props: LpeAudioPlayerControlsProps) => { onPlay, color = 'rgba(var(--lsd-surface-secondary), 1)', onVolumeToggle, + allowFullScreen = false, timeTrackProps: { onValueChange, onMouseDown, onMouseUp }, } = props @@ -46,7 +48,11 @@ export const LpeAudioPlayerControls = (props: LpeAudioPlayerControlsProps) => { - {playing ? : } + {playing ? ( + + ) : ( + + )} @@ -54,9 +60,16 @@ export const LpeAudioPlayerControls = (props: LpeAudioPlayerControlsProps) => { - - {muted ? : } - + + + {muted ? ( + + ) : ( + + )} + + + `