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() {
|
||||
let image = movie.front_image_path;
|
||||
if (enableBackgroundImage && !isEditing && image) {
|
||||
const imageURL = new URL(image);
|
||||
let isDefaultImage = imageURL.searchParams.get("default");
|
||||
if (!isDefaultImage) {
|
||||
return (
|
||||
<div className="background-image-container">
|
||||
<picture>
|
||||
@@ -376,6 +379,7 @@ const MoviePage: React.FC<IProps> = ({ movie }) => {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function maybeRenderTab() {
|
||||
if (!isEditing) {
|
||||
|
||||
@@ -336,6 +336,9 @@ const PerformerPage: React.FC<IProps> = ({ performer, tabKey }) => {
|
||||
|
||||
function maybeRenderHeaderBackgroundImage() {
|
||||
if (enableBackgroundImage && !isEditing && activeImage) {
|
||||
const activeImageURL = new URL(activeImage);
|
||||
let isDefaultImage = activeImageURL.searchParams.get("default");
|
||||
if (!isDefaultImage) {
|
||||
return (
|
||||
<div className="background-image-container">
|
||||
<picture>
|
||||
@@ -350,6 +353,7 @@ const PerformerPage: React.FC<IProps> = ({ performer, tabKey }) => {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function maybeRenderEditPanel() {
|
||||
if (isEditing) {
|
||||
|
||||
@@ -455,6 +455,9 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
|
||||
function maybeRenderHeaderBackgroundImage() {
|
||||
let studioImage = studio.image_path;
|
||||
if (enableBackgroundImage && !isEditing && studioImage) {
|
||||
const studioImageURL = new URL(studioImage);
|
||||
let isDefaultImage = studioImageURL.searchParams.get("default");
|
||||
if (!isDefaultImage) {
|
||||
return (
|
||||
<div className="background-image-container">
|
||||
<picture>
|
||||
@@ -469,6 +472,7 @@ const StudioPage: React.FC<IProps> = ({ studio, tabKey }) => {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function maybeRenderTab() {
|
||||
if (!isEditing) {
|
||||
|
||||
@@ -471,6 +471,9 @@ const TagPage: React.FC<IProps> = ({ tag, tabKey }) => {
|
||||
function maybeRenderHeaderBackgroundImage() {
|
||||
let tagImage = tag.image_path;
|
||||
if (enableBackgroundImage && !isEditing && tagImage) {
|
||||
const tagImageURL = new URL(tagImage);
|
||||
let isDefaultImage = tagImageURL.searchParams.get("default");
|
||||
if (!isDefaultImage) {
|
||||
return (
|
||||
<div className="background-image-container">
|
||||
<picture>
|
||||
@@ -485,6 +488,7 @@ const TagPage: React.FC<IProps> = ({ tag, tabKey }) => {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function maybeRenderTab() {
|
||||
if (!isEditing) {
|
||||
|
||||
Reference in New Issue
Block a user