mirror of
https://github.com/stashapp/stash.git
synced 2025-12-31 12:43:38 +01:00
Add disambiguation to performer link and performer select values (#4541)
* Add disambiguation to PerformerLink * Add disambiguation to performer select values
This commit is contained in:
parent
a4bbdcfbae
commit
235c9c90c2
6 changed files with 23 additions and 4 deletions
|
|
@ -75,6 +75,7 @@ fragment SlimSceneData on Scene {
|
|||
performers {
|
||||
id
|
||||
name
|
||||
disambiguation
|
||||
gender
|
||||
favorite
|
||||
image_path
|
||||
|
|
|
|||
|
|
@ -125,7 +125,14 @@ export const PerformerSelect: React.FC<
|
|||
|
||||
thisOptionProps = {
|
||||
...optionProps,
|
||||
children: object.name,
|
||||
children: (
|
||||
<>
|
||||
<span>{object.name}</span>
|
||||
{object.disambiguation && (
|
||||
<span className="performer-disambiguation">{` (${object.disambiguation})`}</span>
|
||||
)}
|
||||
</>
|
||||
),
|
||||
};
|
||||
|
||||
return <reactSelectComponents.MultiValueLabel {...thisOptionProps} />;
|
||||
|
|
|
|||
|
|
@ -221,6 +221,7 @@
|
|||
|
||||
.performer-select {
|
||||
.performer-disambiguation {
|
||||
color: initial;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@
|
|||
margin: 5px;
|
||||
}
|
||||
|
||||
.performer-tag-container .performer-disambiguation {
|
||||
color: initial;
|
||||
}
|
||||
|
||||
.performer-tag.image,
|
||||
.movie-tag.image {
|
||||
background-position: center;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ import { Icon } from "./Icon";
|
|||
import { PerformerLink } from "./TagLink";
|
||||
|
||||
interface IProps {
|
||||
performers: Partial<GQL.PerformerDataFragment>[];
|
||||
performers: Pick<
|
||||
GQL.Performer,
|
||||
"id" | "name" | "image_path" | "disambiguation" | "gender"
|
||||
>[];
|
||||
}
|
||||
|
||||
export const PerformerPopoverButton: React.FC<IProps> = ({ performers }) => {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const CommonLinkComponent: React.FC<ICommonLinkProps> = ({
|
|||
};
|
||||
|
||||
interface IPerformerLinkProps {
|
||||
performer: INamedObject;
|
||||
performer: INamedObject & { disambiguation?: string | null };
|
||||
linkType?: "scene" | "gallery" | "image";
|
||||
className?: string;
|
||||
}
|
||||
|
|
@ -63,7 +63,10 @@ export const PerformerLink: React.FC<IPerformerLinkProps> = ({
|
|||
|
||||
return (
|
||||
<CommonLinkComponent link={link} className={className}>
|
||||
{title}
|
||||
<span>{title}</span>
|
||||
{performer.disambiguation && (
|
||||
<span className="performer-disambiguation">{` (${performer.disambiguation})`}</span>
|
||||
)}
|
||||
</CommonLinkComponent>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue