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