Feature: Shuffle Button (#941)

This commit is contained in:
Hans Yulian 2025-06-09 16:02:03 +07:00 committed by GitHub
parent c20e30e387
commit aba64b10d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 0 deletions

View file

@ -8,6 +8,7 @@ import {
RiArrowDownSLine,
RiArrowUpSLine,
RiPlayFill,
RiShuffleFill,
} from 'react-icons/ri';
import { generatePath } from 'react-router';
import { Link } from 'react-router-dom';
@ -138,6 +139,21 @@ const PlaylistRow = ({ data, index, style }: ListChildComponentProps) => {
>
<RiPlayFill />
</Button>
<Button
compact
onClick={() => {
if (!data?.items?.[index].id) return;
data.handlePlay(data?.items[index].id, Play.SHUFFLE);
}}
size="md"
tooltip={{
label: t('player.shuffle', { postProcess: 'sentenceCase' }),
openDelay: 500,
}}
variant="default"
>
<RiShuffleFill />
</Button>
<Button
compact
onClick={() => {