mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Uses an Image component to display the logo image
This commit is contained in:
parent
e8422e2c29
commit
8197e012a7
1 changed files with 10 additions and 4 deletions
|
@ -5,6 +5,7 @@ import layoutManager from 'components/layoutManager';
|
||||||
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
||||||
import type { ItemDto } from 'types/base/models/item-dto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
import Image from 'components/common/Image';
|
||||||
|
|
||||||
const shouldShowDetailsMenu = (
|
const shouldShowDetailsMenu = (
|
||||||
cardOptions: CardOptions,
|
cardOptions: CardOptions,
|
||||||
|
@ -23,9 +24,14 @@ interface LogoComponentProps {
|
||||||
logoUrl: string;
|
logoUrl: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const LogoComponent: FC<LogoComponentProps> = ({ logoUrl }) => {
|
const LogoComponent: FC<LogoComponentProps> = ({ logoUrl }) => (
|
||||||
return <Box className='lazy cardFooterLogo' data-src={logoUrl} />;
|
<Box className='cardFooterLogo'>
|
||||||
};
|
<Image
|
||||||
|
imgUrl={logoUrl}
|
||||||
|
containImage={true}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
|
||||||
interface CardFooterTextProps {
|
interface CardFooterTextProps {
|
||||||
item: ItemDto;
|
item: ItemDto;
|
||||||
|
@ -51,7 +57,7 @@ const CardFooterText: FC<CardFooterTextProps> = ({
|
||||||
isOuterFooter
|
isOuterFooter
|
||||||
}) => {
|
}) => {
|
||||||
const { cardTextLines } = useCardText({
|
const { cardTextLines } = useCardText({
|
||||||
item,
|
item: item.ProgramInfo || item,
|
||||||
cardOptions,
|
cardOptions,
|
||||||
forceName,
|
forceName,
|
||||||
imgUrl,
|
imgUrl,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue