mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
fix wrong imageRes being used in some cases
This commit is contained in:
@@ -122,6 +122,7 @@ const CarouselItem = ({ album }: CarouselItemProps) => {
|
|||||||
id={album.imageId}
|
id={album.imageId}
|
||||||
itemType={LibraryItem.ALBUM}
|
itemType={LibraryItem.ALBUM}
|
||||||
src={imageUrl}
|
src={imageUrl}
|
||||||
|
type="itemCard"
|
||||||
/>
|
/>
|
||||||
<div className={styles.playButtonOverlay}>
|
<div className={styles.playButtonOverlay}>
|
||||||
<PlayButtonGroup onPlay={handlePlay} />
|
<PlayButtonGroup onPlay={handlePlay} />
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ const CompactItemCard = ({
|
|||||||
id={data?.imageId}
|
id={data?.imageId}
|
||||||
itemType={itemType}
|
itemType={itemType}
|
||||||
src={(data as Album | AlbumArtist | Playlist | Song)?.imageUrl}
|
src={(data as Album | AlbumArtist | Playlist | Song)?.imageUrl}
|
||||||
|
type="itemCard"
|
||||||
/>
|
/>
|
||||||
{isFavorite && <div className={styles.favoriteBadge} />}
|
{isFavorite && <div className={styles.favoriteBadge} />}
|
||||||
{hasRating && <div className={styles.ratingBadge}>{userRating}</div>}
|
{hasRating && <div className={styles.ratingBadge}>{userRating}</div>}
|
||||||
@@ -553,6 +554,7 @@ const DefaultItemCard = ({
|
|||||||
id={data?.imageId}
|
id={data?.imageId}
|
||||||
itemType={itemType}
|
itemType={itemType}
|
||||||
src={(data as Album | AlbumArtist | Playlist | Song)?.imageUrl}
|
src={(data as Album | AlbumArtist | Playlist | Song)?.imageUrl}
|
||||||
|
type="itemCard"
|
||||||
/>
|
/>
|
||||||
{isFavorite && <div className={styles.favoriteBadge} />}
|
{isFavorite && <div className={styles.favoriteBadge} />}
|
||||||
{hasRating && <div className={styles.ratingBadge}>{userRating}</div>}
|
{hasRating && <div className={styles.ratingBadge}>{userRating}</div>}
|
||||||
@@ -833,6 +835,7 @@ const PosterItemCard = ({
|
|||||||
id={(data as { imageId: string })?.imageId}
|
id={(data as { imageId: string })?.imageId}
|
||||||
itemType={itemType}
|
itemType={itemType}
|
||||||
src={(data as { imageUrl: string })?.imageUrl}
|
src={(data as { imageUrl: string })?.imageUrl}
|
||||||
|
type="itemCard"
|
||||||
/>
|
/>
|
||||||
{isFavorite && <div className={styles.favoriteBadge} />}
|
{isFavorite && <div className={styles.favoriteBadge} />}
|
||||||
{hasRating && <div className={styles.ratingBadge}>{userRating}</div>}
|
{hasRating && <div className={styles.ratingBadge}>{userRating}</div>}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ const BaseItemImage = (
|
|||||||
id?: null | string;
|
id?: null | string;
|
||||||
itemType: LibraryItem;
|
itemType: LibraryItem;
|
||||||
src?: null | string;
|
src?: null | string;
|
||||||
|
type?: keyof z.infer<typeof GeneralSettingsSchema>['imageRes'];
|
||||||
},
|
},
|
||||||
) => {
|
) => {
|
||||||
const { src, ...rest } = props;
|
const { src, ...rest } = props;
|
||||||
@@ -45,7 +46,7 @@ const BaseItemImage = (
|
|||||||
id: props.id,
|
id: props.id,
|
||||||
imageUrl: src,
|
imageUrl: src,
|
||||||
itemType: props.itemType,
|
itemType: props.itemType,
|
||||||
size: 300,
|
type: props.type,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ export const ImageColumn = (props: ItemTableListInnerColumn) => {
|
|||||||
id={item?.imageId}
|
id={item?.imageId}
|
||||||
itemType={item?._itemType}
|
itemType={item?._itemType}
|
||||||
src={item?.imageUrl}
|
src={item?.imageUrl}
|
||||||
|
type="table"
|
||||||
/>
|
/>
|
||||||
{isHovered && (
|
{isHovered && (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ export const DefaultTitleCombinedColumn = (props: ItemTableListInnerColumn) => {
|
|||||||
id={item?.imageId}
|
id={item?.imageId}
|
||||||
itemType={item?._itemType}
|
itemType={item?._itemType}
|
||||||
src={item?.imageUrl}
|
src={item?.imageUrl}
|
||||||
|
type="table"
|
||||||
/>
|
/>
|
||||||
{isHovered && (
|
{isHovered && (
|
||||||
<div
|
<div
|
||||||
@@ -239,6 +240,7 @@ export const QueueSongTitleCombinedColumn = (props: ItemTableListInnerColumn) =>
|
|||||||
id={item?.imageId}
|
id={item?.imageId}
|
||||||
itemType={item?._itemType}
|
itemType={item?._itemType}
|
||||||
src={item?.imageUrl}
|
src={item?.imageUrl}
|
||||||
|
type="table"
|
||||||
/>
|
/>
|
||||||
{isHovered && (
|
{isHovered && (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ export const LeftControls = () => {
|
|||||||
id={currentSong?.imageId}
|
id={currentSong?.imageId}
|
||||||
itemType={LibraryItem.SONG}
|
itemType={LibraryItem.SONG}
|
||||||
loading="eager"
|
loading="eager"
|
||||||
|
type="table"
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{!collapsed && (
|
{!collapsed && (
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ export const MobilePlayerbar = () => {
|
|||||||
id={currentSong.imageId}
|
id={currentSong.imageId}
|
||||||
itemType={LibraryItem.SONG}
|
itemType={LibraryItem.SONG}
|
||||||
loading="eager"
|
loading="eager"
|
||||||
|
type="table"
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
@@ -561,6 +561,7 @@ const PlaylistTableItem = memo(
|
|||||||
className: styles.imageContainer,
|
className: styles.imageContainer,
|
||||||
}}
|
}}
|
||||||
itemType={LibraryItem.PLAYLIST}
|
itemType={LibraryItem.PLAYLIST}
|
||||||
|
type="table"
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ export const LibraryCommandItem = ({
|
|||||||
id={imageId}
|
id={imageId}
|
||||||
itemType={itemType}
|
itemType={itemType}
|
||||||
src={imageUrl}
|
src={imageUrl}
|
||||||
|
type="table"
|
||||||
width={40}
|
width={40}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ export const LibraryHeader = forwardRef(
|
|||||||
itemType={item.type as LibraryItem}
|
itemType={item.type as LibraryItem}
|
||||||
onError={onImageError}
|
onError={onImageError}
|
||||||
src={imageUrl || ''}
|
src={imageUrl || ''}
|
||||||
|
type="header"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user