From 933d6d0bd5460d9595e8dd5c83ddae898fd39b3f Mon Sep 17 00:00:00 2001 From: caustico <47966524+caustico@users.noreply.github.com> Date: Sat, 12 Sep 2020 11:11:43 +0200 Subject: [PATCH] Add gallery icon in "scene card" and "scene list table" (#799) --- ui/v2.5/src/components/Scenes/SceneCard.tsx | 18 +++++++++++++++++- .../src/components/Scenes/SceneListTable.tsx | 14 +++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/ui/v2.5/src/components/Scenes/SceneCard.tsx b/ui/v2.5/src/components/Scenes/SceneCard.tsx index 64c0a011b..d3d3eb04f 100644 --- a/ui/v2.5/src/components/Scenes/SceneCard.tsx +++ b/ui/v2.5/src/components/Scenes/SceneCard.tsx @@ -241,13 +241,28 @@ export const SceneCard: React.FC = ( } } + function maybeRenderGallery() { + if (props.scene.gallery) { + return ( +
+ + + +
+ ); + } + } + function maybeRenderPopoverButtonGroup() { if ( props.scene.tags.length > 0 || props.scene.performers.length > 0 || props.scene.movies.length > 0 || props.scene.scene_markers.length > 0 || - props.scene?.o_counter + props.scene?.o_counter || + props.scene.gallery ) { return ( <> @@ -258,6 +273,7 @@ export const SceneCard: React.FC = ( {maybeRenderMoviePopoverButton()} {maybeRenderSceneMarkerPopoverButton()} {maybeRenderOCounter()} + {maybeRenderGallery()} ); diff --git a/ui/v2.5/src/components/Scenes/SceneListTable.tsx b/ui/v2.5/src/components/Scenes/SceneListTable.tsx index 610439421..f85ddf5ba 100644 --- a/ui/v2.5/src/components/Scenes/SceneListTable.tsx +++ b/ui/v2.5/src/components/Scenes/SceneListTable.tsx @@ -1,9 +1,11 @@ +// @ts-nocheck /* eslint-disable jsx-a11y/control-has-associated-label */ import React from "react"; -import { Table } from "react-bootstrap"; +import { Table, Button } from "react-bootstrap"; import { Link } from "react-router-dom"; import * as GQL from "src/core/generated-graphql"; import { NavUtils, TextUtils } from "src/utils"; +import { Icon } from "src/components/Shared"; interface ISceneListTableProps { scenes: GQL.SlimSceneDataFragment[]; @@ -68,6 +70,15 @@ export const SceneListTable: React.FC = ( )} {renderMovies(scene)} + + {scene.gallery && ( + + )} + ); @@ -84,6 +95,7 @@ export const SceneListTable: React.FC = ( Performers Studio Movies + Gallery {props.scenes.map(renderSceneRow)}