mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Fix image title not appearing in lightbox (#5675)
This commit is contained in:
parent
e97f647a43
commit
587fd9e6b8
2 changed files with 6 additions and 3 deletions
|
|
@ -48,6 +48,7 @@ import {
|
|||
import { RatingSystem } from "src/components/Shared/Rating/RatingSystem";
|
||||
import { useDebounce } from "../debounce";
|
||||
import { isVideo } from "src/utils/visualFile";
|
||||
import { imageTitle } from "src/core/files";
|
||||
|
||||
const CLASSNAME = "Lightbox";
|
||||
const CLASSNAME_HEADER = `${CLASSNAME}-header`;
|
||||
|
|
@ -689,6 +690,7 @@ export const LightboxComponent: React.FC<IProps> = ({
|
|||
}
|
||||
|
||||
const currentImage: ILightboxImage | undefined = images[currentIndex];
|
||||
const title = currentImage ? imageTitle(currentImage) : undefined;
|
||||
|
||||
function setRating(v: number | null) {
|
||||
if (currentImage?.id) {
|
||||
|
|
@ -932,9 +934,9 @@ export const LightboxComponent: React.FC<IProps> = ({
|
|||
)}
|
||||
</div>
|
||||
<div>
|
||||
{currentImage?.title && (
|
||||
{currentImage && (
|
||||
<Link to={`/images/${currentImage.id}`} onClick={() => close()}>
|
||||
{currentImage.title ?? ""}
|
||||
{title ?? ""}
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ interface IImagePaths {
|
|||
|
||||
interface IFiles {
|
||||
__typename?: string;
|
||||
path: string;
|
||||
width: number;
|
||||
height: number;
|
||||
video_codec?: GQL.Maybe<string>;
|
||||
|
|
@ -19,7 +20,7 @@ export interface ILightboxImage {
|
|||
rating100?: GQL.Maybe<number>;
|
||||
o_counter?: GQL.Maybe<number>;
|
||||
paths: IImagePaths;
|
||||
visual_files?: GQL.Maybe<IFiles>[];
|
||||
visual_files?: IFiles[];
|
||||
}
|
||||
|
||||
export interface IChapter {
|
||||
|
|
|
|||
Loading…
Reference in a new issue