mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
only use details background image when provided (#4515)
This commit is contained in:
@@ -362,6 +362,9 @@ const MoviePage: React.FC<IProps> = ({ movie }) => {
|
|||||||
function maybeRenderHeaderBackgroundImage() {
|
function maybeRenderHeaderBackgroundImage() {
|
||||||
let image = movie.front_image_path;
|
let image = movie.front_image_path;
|
||||||
if (enableBackgroundImage && !isEditing && image) {
|
if (enableBackgroundImage && !isEditing && image) {
|
||||||
|
const imageURL = new URL(image);
|
||||||
|
let isDefaultImage = imageURL.searchParams.get("default");
|
||||||
|
if (!isDefaultImage) {
|
||||||
return (
|
return (
|
||||||
<div className="background-image-container">
|
<div className="background-image-container">
|
||||||
<picture>
|
<picture>
|
||||||
@@ -376,6 +379,7 @@ const MoviePage: React.FC<IProps> = ({ movie }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function maybeRenderTab() {
|
function maybeRenderTab() {
|
||||||
if (!isEditing) {
|
if (!isEditing) {
|
||||||
|
|||||||
@@ -336,6 +336,9 @@ const PerformerPage: React.FC<IProps> = ({ performer, tabKey }) => {
|
|||||||
|
|
||||||
function maybeRenderHeaderBackgroundImage() {
|
function maybeRenderHeaderBackgroundImage() {
|
||||||
if (enableBackgroundImage && !isEditing && activeImage) {
|
if (enableBackgroundImage && !isEditing && activeImage) {
|
||||||
|
const activeImageURL = new URL(activeImage);
|
||||||
|
let isDefaultImage = activeImageURL.searchParams.get("default");
|
||||||
|
if (!isDefaultImage) {
|
||||||
return (
|
return (
|
||||||
<div className="background-image-container">
|
<div className="background-image-container">
|
||||||
<picture>
|
<picture>
|
||||||
@@ -350,6 +353,7 @@ const PerformerPage: React.FC<IProps> = ({ performer, tabKey }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function maybeRenderEditPanel() {
|
function maybeRenderEditPanel() {
|
||||||
if (isEditing) {
|
if (isEditing) {
|
||||||
|
|||||||
@@ -455,6 +455,9 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
|
|||||||
function maybeRenderHeaderBackgroundImage() {
|
function maybeRenderHeaderBackgroundImage() {
|
||||||
let studioImage = studio.image_path;
|
let studioImage = studio.image_path;
|
||||||
if (enableBackgroundImage && !isEditing && studioImage) {
|
if (enableBackgroundImage && !isEditing && studioImage) {
|
||||||
|
const studioImageURL = new URL(studioImage);
|
||||||
|
let isDefaultImage = studioImageURL.searchParams.get("default");
|
||||||
|
if (!isDefaultImage) {
|
||||||
return (
|
return (
|
||||||
<div className="background-image-container">
|
<div className="background-image-container">
|
||||||
<picture>
|
<picture>
|
||||||
@@ -469,6 +472,7 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function maybeRenderTab() {
|
function maybeRenderTab() {
|
||||||
if (!isEditing) {
|
if (!isEditing) {
|
||||||
|
|||||||
@@ -471,6 +471,9 @@ const TagPage: React.FC<IProps> = ({ tag, tabKey }) => {
|
|||||||
function maybeRenderHeaderBackgroundImage() {
|
function maybeRenderHeaderBackgroundImage() {
|
||||||
let tagImage = tag.image_path;
|
let tagImage = tag.image_path;
|
||||||
if (enableBackgroundImage && !isEditing && tagImage) {
|
if (enableBackgroundImage && !isEditing && tagImage) {
|
||||||
|
const tagImageURL = new URL(tagImage);
|
||||||
|
let isDefaultImage = tagImageURL.searchParams.get("default");
|
||||||
|
if (!isDefaultImage) {
|
||||||
return (
|
return (
|
||||||
<div className="background-image-container">
|
<div className="background-image-container">
|
||||||
<picture>
|
<picture>
|
||||||
@@ -485,6 +488,7 @@ const TagPage: React.FC<IProps> = ({ tag, tabKey }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function maybeRenderTab() {
|
function maybeRenderTab() {
|
||||||
if (!isEditing) {
|
if (!isEditing) {
|
||||||
|
|||||||
Reference in New Issue
Block a user