Skip to content

Commit

Permalink
Add Galleries tab to Tag details page (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutPants authored Mar 11, 2021
1 parent 23d8565 commit b63e8ef
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/v2.5/src/components/Changelog/versions/v060.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 8 additions & 1 deletion ui/v2.5/src/components/Tags/TagDetails/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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>
Expand Down
12 changes: 12 additions & 0 deletions ui/v2.5/src/components/Tags/TagDetails/TagGalleriesPanel.tsx
Original file line number Diff line number Diff line change
@@ -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)} />;
};

0 comments on commit b63e8ef

Please sign in to comment.