mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Add gallery icon in "scene card" and "scene list table" (#799)
This commit is contained in:
@@ -241,13 +241,28 @@ export const SceneCard: React.FC<ISceneCardProps> = (
|
||||
}
|
||||
}
|
||||
|
||||
function maybeRenderGallery() {
|
||||
if (props.scene.gallery) {
|
||||
return (
|
||||
<div>
|
||||
<Link to={`/galleries/${props.scene.gallery.id}`}>
|
||||
<Button className="minimal">
|
||||
<Icon icon="image" />
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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<ISceneCardProps> = (
|
||||
{maybeRenderMoviePopoverButton()}
|
||||
{maybeRenderSceneMarkerPopoverButton()}
|
||||
{maybeRenderOCounter()}
|
||||
{maybeRenderGallery()}
|
||||
</ButtonGroup>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user