mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add tags to studios (#4858)
* Fix makeTagFilter mode * Remove studio_tags filter criterion This is handled by studios_filter. The support for this still needs to be added in the UI, so I have removed the criterion options in the short-term. --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React from "react";
|
||||
import { TagLink } from "src/components/Shared/TagLink";
|
||||
import * as GQL from "src/core/generated-graphql";
|
||||
import { DetailItem } from "src/components/Shared/DetailItem";
|
||||
import { StashIDPill } from "src/components/Shared/StashID";
|
||||
@@ -15,6 +16,19 @@ export const StudioDetailsPanel: React.FC<IStudioDetailsPanel> = ({
|
||||
collapsed,
|
||||
fullWidth,
|
||||
}) => {
|
||||
function renderTagsField() {
|
||||
if (!studio.tags.length) {
|
||||
return;
|
||||
}
|
||||
return (
|
||||
<ul className="pl-0">
|
||||
{(studio.tags ?? []).map((tag) => (
|
||||
<TagLink key={tag.id} linkType="studio" tag={tag} />
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
|
||||
function renderStashIDs() {
|
||||
if (!studio.stash_ids?.length) {
|
||||
return;
|
||||
@@ -36,11 +50,18 @@ export const StudioDetailsPanel: React.FC<IStudioDetailsPanel> = ({
|
||||
function maybeRenderExtraDetails() {
|
||||
if (!collapsed) {
|
||||
return (
|
||||
<DetailItem
|
||||
id="stash_ids"
|
||||
value={renderStashIDs()}
|
||||
fullWidth={fullWidth}
|
||||
/>
|
||||
<>
|
||||
<DetailItem
|
||||
id="tags"
|
||||
value={renderTagsField()}
|
||||
fullWidth={fullWidth}
|
||||
/>
|
||||
<DetailItem
|
||||
id="stash_ids"
|
||||
value={renderStashIDs()}
|
||||
fullWidth={fullWidth}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user