mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 20:40:15 +02:00
Album radio (#1759)
* added album radio feature --------- Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a78f5803a5
commit
4918b412b2
@@ -287,6 +287,7 @@ export const calculateTitleSize = (title: string) => {
|
||||
|
||||
interface LibraryHeaderMenuProps {
|
||||
favorite?: boolean;
|
||||
onAlbumRadio?: () => void;
|
||||
onArtistRadio?: () => void;
|
||||
onFavorite?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
||||
onMore?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
||||
@@ -298,6 +299,7 @@ interface LibraryHeaderMenuProps {
|
||||
|
||||
export const LibraryHeaderMenu = ({
|
||||
favorite,
|
||||
onAlbumRadio,
|
||||
onArtistRadio,
|
||||
onFavorite,
|
||||
onMore,
|
||||
@@ -349,8 +351,26 @@ export const LibraryHeaderMenu = ({
|
||||
{onPlay && (
|
||||
<PlayLastTextButton {...handlePlayLast.handlers} {...handlePlayLast.props} />
|
||||
)}
|
||||
{onAlbumRadio && (
|
||||
<Button
|
||||
disabled={isPlayerFetching}
|
||||
leftSection={
|
||||
isPlayerFetching ? (
|
||||
<Spinner color="white" />
|
||||
) : (
|
||||
<Icon icon="radio" size="lg" />
|
||||
)
|
||||
}
|
||||
onClick={onAlbumRadio}
|
||||
size="md"
|
||||
variant="transparent"
|
||||
>
|
||||
{t('player.albumRadio', { postProcess: 'sentenceCase' })}
|
||||
</Button>
|
||||
)}
|
||||
{onArtistRadio && (
|
||||
<Button
|
||||
disabled={isPlayerFetching}
|
||||
leftSection={
|
||||
isPlayerFetching ? (
|
||||
<Spinner color="white" />
|
||||
|
||||
Reference in New Issue
Block a user