diff --git a/src/renderer/features/player/components/full-screen-player-image.module.css b/src/renderer/features/player/components/full-screen-player-image.module.css index 96e588e1..d134651b 100644 --- a/src/renderer/features/player/components/full-screen-player-image.module.css +++ b/src/renderer/features/player/components/full-screen-player-image.module.css @@ -2,7 +2,6 @@ position: absolute; max-width: 100%; height: 100%; - object-fit: var(--theme-image-fit); object-position: 50% 100%; border-radius: 5px; filter: drop-shadow(0 0 5px rgb(0 0 0 / 40%)) drop-shadow(0 0 5px rgb(0 0 0 / 40%)); @@ -24,8 +23,13 @@ justify-content: center; padding: 1rem; text-align: center; + cursor: default; border-radius: 5px; + a { + cursor: pointer; + } + h1 { font-size: 3.5vh; } diff --git a/src/renderer/features/player/components/full-screen-player-image.tsx b/src/renderer/features/player/components/full-screen-player-image.tsx index 98d937cd..165341e2 100644 --- a/src/renderer/features/player/components/full-screen-player-image.tsx +++ b/src/renderer/features/player/components/full-screen-player-image.tsx @@ -16,9 +16,7 @@ import { Center } from '/@/shared/components/center/center'; import { Flex } from '/@/shared/components/flex/flex'; import { Group } from '/@/shared/components/group/group'; import { Icon } from '/@/shared/components/icon/icon'; -import { Image } from '/@/shared/components/image/image'; import { Stack } from '/@/shared/components/stack/stack'; -import { TextTitle } from '/@/shared/components/text-title/text-title'; import { Text } from '/@/shared/components/text/text'; import { PlayerData, QueueSong } from '/@/shared/types/domain-types'; @@ -52,9 +50,14 @@ const scaleImageUrl = (imageSize: number, url?: null | string) => { .replace(/&height=\d+/, `&height=${imageSize}`); }; -const MotionImage = motion.create(Image); +const MotionImage = motion.img; + +const ImageWithPlaceholder = ({ + className, + ...props +}: HTMLMotionProps<'img'> & { placeholder?: string }) => { + const nativeAspectRatio = useSettingsStore((store) => store.general.nativeAspectRatio); -const ImageWithPlaceholder = ({ ...props }: HTMLMotionProps<'img'> & { placeholder?: string }) => { if (!props.src) { return (
& { placehold return ( ); @@ -201,40 +208,32 @@ export const FullScreenPlayerImage = () => { - {currentSong?.name} - - + - {currentSong?.album}{' '} - - + {currentSong?.album} + + {currentSong?.artists?.map((artist, index) => ( {index > 0 && ( @@ -253,9 +252,6 @@ export const FullScreenPlayerImage = () => { fw={600} isLink isMuted - style={{ - textShadow: 'var(--theme-fullscreen-player-text-shadow)', - }} to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, { albumArtistId: artist.id, })} @@ -264,7 +260,7 @@ export const FullScreenPlayerImage = () => { ))} - + , 'src'> { containerClassName?: string; + enableAnimation?: boolean; + imageContainerProps?: Omit; includeLoader?: boolean; includeUnloader?: boolean; src: string | string[] | undefined; @@ -32,6 +36,8 @@ interface ImageUnloaderProps { export function Image({ className, containerClassName, + enableAnimation, + imageContainerProps, includeLoader = true, includeUnloader = true, src, @@ -41,7 +47,13 @@ export function Image({ ( - {children} + + {children} + )} loader={ includeLoader ? ( @@ -50,7 +62,6 @@ export function Image({ ) : null } - loading="lazy" src={src} unloader={ includeUnloader ? ( @@ -66,8 +77,27 @@ export function Image({ return ; } -function ImageContainer({ children, className }: ImageContainerProps) { - return
{children}
; +function ImageContainer({ children, className, enableAnimation, ...props }: ImageContainerProps) { + if (!enableAnimation) { + return ( +
+ {children} +
+ ); + } + + return ( + + {children} + + ); } function ImageLoader({ className }: ImageLoaderProps) {