Add Galleries tab to Tag details page (#1195)

This commit is contained in:
WithoutPants 2021-03-12 08:27:59 +11:00 committed by GitHub
parent 23d85655a8
commit b63e8ef929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 1 deletions

View file

@ -2,6 +2,7 @@
* Added Performer tags.
### 🎨 Improvements
* Add galleries tab to Tag details page.
* Allow scene/performer/studio image upload via URL.
* Add button to hide unmatched scenes in Tagger view.
* Hide create option in dropdowns when searching in filters.

View file

@ -23,6 +23,7 @@ import { TagScenesPanel } from "./TagScenesPanel";
import { TagMarkersPanel } from "./TagMarkersPanel";
import { TagImagesPanel } from "./TagImagesPanel";
import { TagPerformersPanel } from "./TagPerformersPanel";
import { TagGalleriesPanel } from "./TagGalleriesPanel";
interface ITabParams {
id?: string;
@ -53,7 +54,10 @@ export const Tag: React.FC = () => {
const [deleteTag] = useTagDestroy(getTagInput() as GQL.TagUpdateInput);
const activeTabKey =
tab === "markers" || tab === "images" || tab === "performers"
tab === "markers" ||
tab === "images" ||
tab === "performers" ||
tab === "galleries"
? tab
: "scenes";
const setActiveTabKey = (newTab: string | null) => {
@ -261,6 +265,9 @@ export const Tag: React.FC = () => {
<Tab eventKey="images" title="Images">
<TagImagesPanel tag={tag} />
</Tab>
<Tab eventKey="galleries" title="Galleries">
<TagGalleriesPanel tag={tag} />
</Tab>
<Tab eventKey="markers" title="Markers">
<TagMarkersPanel tag={tag} />
</Tab>

View file

@ -0,0 +1,12 @@
import React from "react";
import * as GQL from "src/core/generated-graphql";
import { tagFilterHook } from "src/core/tags";
import { GalleryList } from "src/components/Galleries/GalleryList";
interface ITagGalleriesPanel {
tag: GQL.TagDataFragment;
}
export const TagGalleriesPanel: React.FC<ITagGalleriesPanel> = ({ tag }) => {
return <GalleryList filterHook={tagFilterHook(tag)} />;
};