- {images.length > 0 && !isLoading && !isSwitchingPage ? (
- <>
-
-
-
- {pageHeader}
-
- {`${currentIndex + 1} / ${images.length}`}
-
-
-
-
-
-
-
setShowOptions(false)}
- >
- {({ placement, arrowProps, show: _show, ...props }) => (
-
- {optionsPopover}
-
- )}
-
-
-
-
-
-
- {slideshowEnabled && (
-
- )}
- {zoom !== 1 && (
-
- )}
- {document.fullscreenEnabled && (
-
- )}
+
+
+
+ {pageHeader}
+ {images.length > 1 ? (
+ {`${currentIndex + 1} / ${images.length}`}
+ ) : undefined}
+
+
+
+
+
setShowOptions(false)}
+ >
+ {({ placement, arrowProps, show: _show, ...props }) => (
+
+ {optionsPopover}
+
+ )}
+
+
+
+
-
- {allowNavigation && (
-
- )}
-
-
- {images.map((image, i) => (
-
- {i >= currentIndex - 1 && i <= currentIndex + 1 ? (
- setZoom(v)}
- resetPosition={resetPosition}
- />
- ) : undefined}
-
- ))}
-
-
- {allowNavigation && (
-
- )}
-
- {showNavigation && !isFullscreen && images.length > 1 && (
-
-
- {navItems}
-
-
+
+
)}
- >
- ) : (
-
- )}
-
- ) : (
- <>>
- );
+ {zoom !== 1 && (
+
+ )}
+ {document.fullscreenEnabled && (
+
+ )}
+
+
+
+
+ {allowNavigation && (
+
+ )}
- return element;
+
+ {images.map((image, i) => (
+
+ {i >= currentIndex - 1 && i <= currentIndex + 1 ? (
+ setZoom(v)}
+ resetPosition={resetPosition}
+ />
+ ) : undefined}
+
+ ))}
+
+
+ {allowNavigation && (
+
+ )}
+
+ {showNavigation && !isFullscreen && images.length > 1 && (
+
+
+ {navItems}
+
+
+ )}
+
+
+ {currentImage.id !== undefined && (
+ <>
+
+
+
+
{
+ setRating(v ?? null);
+ }}
+ />
+ >
+ )}
+
+
+ {currentImage.title && (
+ hide()}>
+ {currentImage.title ?? ""}
+
+ )}
+
+
+
+
+ );
};
diff --git a/ui/v2.5/src/hooks/Lightbox/context.tsx b/ui/v2.5/src/hooks/Lightbox/context.tsx
index 8980415af..c8e9bc106 100644
--- a/ui/v2.5/src/hooks/Lightbox/context.tsx
+++ b/ui/v2.5/src/hooks/Lightbox/context.tsx
@@ -1,11 +1,8 @@
import React, { useCallback, useState } from "react";
-import * as GQL from "src/core/generated-graphql";
-import { LightboxComponent } from "./Lightbox";
-
-type Image = Pick
;
+import { ILightboxImage, LightboxComponent } from "./Lightbox";
export interface IState {
- images: Image[];
+ images: ILightboxImage[];
isVisible: boolean;
isLoading: boolean;
showNavigation: boolean;
diff --git a/ui/v2.5/src/hooks/Lightbox/lightbox.scss b/ui/v2.5/src/hooks/Lightbox/lightbox.scss
index d759646c4..ab59bfb3e 100644
--- a/ui/v2.5/src/hooks/Lightbox/lightbox.scss
+++ b/ui/v2.5/src/hooks/Lightbox/lightbox.scss
@@ -9,23 +9,23 @@
top: 0;
z-index: 1040;
- .fa-icon {
- path {
- fill: white;
- }
- opacity: 0.4;
-
- &:hover {
- opacity: 1;
- }
- }
-
&-header {
align-items: center;
display: flex;
flex-shrink: 0;
height: 4rem;
+ .fa-icon {
+ path {
+ fill: white;
+ }
+ opacity: 0.4;
+
+ &:hover {
+ opacity: 1;
+ }
+ }
+
&-left-spacer {
display: flex;
flex: 1;
@@ -72,11 +72,42 @@
}
}
+ &-footer {
+ align-items: center;
+ display: flex;
+ flex-shrink: 0;
+ height: 4.5rem;
+
+ & > div {
+ flex: 1;
+
+ &:nth-child(2) {
+ text-align: center;
+ }
+ }
+
+ .rating-stars {
+ padding-left: 0.38rem;
+ }
+
+ &-left {
+ display: flex;
+ flex-direction: column;
+ justify-content: start;
+ padding-left: 1em;
+ }
+
+ a {
+ color: $text-color;
+ font-weight: bold;
+ text-decoration: none;
+ }
+ }
+
&-display {
display: flex;
height: 100%;
justify-content: space-between;
- margin-bottom: 2rem;
position: relative;
}
@@ -125,7 +156,16 @@
.fa-icon {
height: 4rem;
+ opacity: 0.4;
width: 4rem;
+
+ path {
+ fill: white;
+ }
+
+ &:hover {
+ opacity: 1;
+ }
}
&:focus {