mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
fix error on album/albumartist header image (#1299)
This commit is contained in:
@@ -42,7 +42,7 @@ const AlbumDetailRoute = () => {
|
|||||||
|
|
||||||
const background = backgroundColor;
|
const background = backgroundColor;
|
||||||
|
|
||||||
const showBlurredImage = Boolean(detailQuery.data?.imageUrl) && albumBackground;
|
const showBlurredImage = albumBackground;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnimatedPage key={`album-detail-${albumId}`}>
|
<AnimatedPage key={`album-detail-${albumId}`}>
|
||||||
@@ -70,7 +70,7 @@ const AlbumDetailRoute = () => {
|
|||||||
<LibraryBackgroundImage
|
<LibraryBackgroundImage
|
||||||
blur={albumBackgroundBlur}
|
blur={albumBackgroundBlur}
|
||||||
headerRef={headerRef}
|
headerRef={headerRef}
|
||||||
imageUrl={detailQuery.data.imageUrl!}
|
imageUrl={detailQuery.data?.imageUrl}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<LibraryBackgroundOverlay backgroundColor={background} headerRef={headerRef} />
|
<LibraryBackgroundOverlay backgroundColor={background} headerRef={headerRef} />
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const AlbumArtistDetailRoute = () => {
|
|||||||
|
|
||||||
const background = backgroundColor;
|
const background = backgroundColor;
|
||||||
|
|
||||||
const showBlurredImage = Boolean(detailQuery.data?.imageUrl) && artistBackground;
|
const showBlurredImage = artistBackground;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnimatedPage key={`album-artist-detail-${routeId}`}>
|
<AnimatedPage key={`album-artist-detail-${routeId}`}>
|
||||||
|
|||||||
@@ -69,11 +69,11 @@ export const BackgroundOverlay = ({
|
|||||||
interface LibraryBackgroundProps {
|
interface LibraryBackgroundProps {
|
||||||
blur?: number;
|
blur?: number;
|
||||||
headerRef: React.RefObject<HTMLDivElement | null>;
|
headerRef: React.RefObject<HTMLDivElement | null>;
|
||||||
imageUrl?: string;
|
imageUrl: null | string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LibraryBackgroundImage = ({ blur, headerRef, imageUrl }: LibraryBackgroundProps) => {
|
export const LibraryBackgroundImage = ({ blur, headerRef, imageUrl }: LibraryBackgroundProps) => {
|
||||||
const url = `url(${imageUrl})`;
|
const url = imageUrl ? `url(${imageUrl})` : undefined;
|
||||||
const height = useHeaderHeight(headerRef);
|
const height = useHeaderHeight(headerRef);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -627,9 +627,9 @@ const initialState: SettingsState = {
|
|||||||
accent: 'rgb(53, 116, 252)',
|
accent: 'rgb(53, 116, 252)',
|
||||||
albumArtRes: undefined,
|
albumArtRes: undefined,
|
||||||
albumBackground: false,
|
albumBackground: false,
|
||||||
albumBackgroundBlur: 6,
|
albumBackgroundBlur: 3,
|
||||||
artistBackground: false,
|
artistBackground: false,
|
||||||
artistBackgroundBlur: 6,
|
artistBackgroundBlur: 3,
|
||||||
artistItems,
|
artistItems,
|
||||||
buttonSize: 15,
|
buttonSize: 15,
|
||||||
disabledContextMenu: {},
|
disabledContextMenu: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user