mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
[enhancement] Add a button size setting (#486)
* Add a button size setting * Reduce setting size and add px suffix * Looks like I don't need || inside of control-settings * Update translation * Bump settings version to 7
This commit is contained in:
parent
933573b57f
commit
86a93866d0
4 changed files with 46 additions and 12 deletions
|
|
@ -98,6 +98,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
const [isSeeking, setIsSeeking] = useState(false);
|
||||
const currentSong = useCurrentSong();
|
||||
const skip = useSettingsStore((state) => state.general.skipButtons);
|
||||
const buttonSize = useSettingsStore((state) => state.general.buttonSize);
|
||||
const playerType = usePlayerType();
|
||||
const player1 = playersRef?.current?.player1;
|
||||
const player2 = playersRef?.current?.player2;
|
||||
|
|
@ -171,7 +172,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
<ControlsContainer>
|
||||
<ButtonsContainer>
|
||||
<PlayerButton
|
||||
icon={<RiStopFill size={20} />}
|
||||
icon={<RiStopFill size={buttonSize} />}
|
||||
tooltip={{
|
||||
label: t('player.stop', { postProcess: 'sentenceCase' }),
|
||||
}}
|
||||
|
|
@ -180,7 +181,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
/>
|
||||
<PlayerButton
|
||||
$isActive={shuffle !== PlayerShuffle.NONE}
|
||||
icon={<RiShuffleFill size={20} />}
|
||||
icon={<RiShuffleFill size={buttonSize} />}
|
||||
tooltip={{
|
||||
label:
|
||||
shuffle === PlayerShuffle.NONE
|
||||
|
|
@ -194,7 +195,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
onClick={handleToggleShuffle}
|
||||
/>
|
||||
<PlayerButton
|
||||
icon={<RiSkipBackFill size={20} />}
|
||||
icon={<RiSkipBackFill size={buttonSize} />}
|
||||
tooltip={{
|
||||
label: t('player.previous', { postProcess: 'sentenceCase' }),
|
||||
}}
|
||||
|
|
@ -203,7 +204,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
/>
|
||||
{skip?.enabled && (
|
||||
<PlayerButton
|
||||
icon={<RiRewindFill size={20} />}
|
||||
icon={<RiRewindFill size={buttonSize} />}
|
||||
tooltip={{
|
||||
label: t('player.skip', {
|
||||
context: 'back',
|
||||
|
|
@ -218,9 +219,9 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
disabled={currentSong?.id === undefined}
|
||||
icon={
|
||||
status === PlayerStatus.PAUSED ? (
|
||||
<RiPlayFill size={20} />
|
||||
<RiPlayFill size={buttonSize} />
|
||||
) : (
|
||||
<IoIosPause size={20} />
|
||||
<IoIosPause size={buttonSize} />
|
||||
)
|
||||
}
|
||||
tooltip={{
|
||||
|
|
@ -234,7 +235,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
/>
|
||||
{skip?.enabled && (
|
||||
<PlayerButton
|
||||
icon={<RiSpeedFill size={20} />}
|
||||
icon={<RiSpeedFill size={buttonSize} />}
|
||||
tooltip={{
|
||||
label: t('player.skip', {
|
||||
context: 'forward',
|
||||
|
|
@ -246,7 +247,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
/>
|
||||
)}
|
||||
<PlayerButton
|
||||
icon={<RiSkipForwardFill size={20} />}
|
||||
icon={<RiSkipForwardFill size={buttonSize} />}
|
||||
tooltip={{
|
||||
label: t('player.next', { postProcess: 'sentenceCase' }),
|
||||
}}
|
||||
|
|
@ -257,9 +258,9 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
$isActive={repeat !== PlayerRepeat.NONE}
|
||||
icon={
|
||||
repeat === PlayerRepeat.ONE ? (
|
||||
<RiRepeatOneLine size={20} />
|
||||
<RiRepeatOneLine size={buttonSize} />
|
||||
) : (
|
||||
<RiRepeat2Line size={20} />
|
||||
<RiRepeat2Line size={buttonSize} />
|
||||
)
|
||||
}
|
||||
tooltip={{
|
||||
|
|
@ -285,7 +286,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||
/>
|
||||
|
||||
<PlayerButton
|
||||
icon={<BsDice3 size={20} />}
|
||||
icon={<BsDice3 size={buttonSize} />}
|
||||
tooltip={{
|
||||
label: t('player.playRandom', { postProcess: 'sentenceCase' }),
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue