mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03: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:
@@ -75,6 +75,7 @@ fragment SlimSceneData on Scene {
|
|||||||
performers {
|
performers {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
disambiguation
|
||||||
gender
|
gender
|
||||||
favorite
|
favorite
|
||||||
image_path
|
image_path
|
||||||
|
|||||||
@@ -125,7 +125,14 @@ export const PerformerSelect: React.FC<
|
|||||||
|
|
||||||
thisOptionProps = {
|
thisOptionProps = {
|
||||||
...optionProps,
|
...optionProps,
|
||||||
children: object.name,
|
children: (
|
||||||
|
<>
|
||||||
|
<span>{object.name}</span>
|
||||||
|
{object.disambiguation && (
|
||||||
|
<span className="performer-disambiguation">{` (${object.disambiguation})`}</span>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
return <reactSelectComponents.MultiValueLabel {...thisOptionProps} />;
|
return <reactSelectComponents.MultiValueLabel {...thisOptionProps} />;
|
||||||
|
|||||||
@@ -221,6 +221,7 @@
|
|||||||
|
|
||||||
.performer-select {
|
.performer-select {
|
||||||
.performer-disambiguation {
|
.performer-disambiguation {
|
||||||
|
color: initial;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,10 @@
|
|||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.performer-tag-container .performer-disambiguation {
|
||||||
|
color: initial;
|
||||||
|
}
|
||||||
|
|
||||||
.performer-tag.image,
|
.performer-tag.image,
|
||||||
.movie-tag.image {
|
.movie-tag.image {
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ import { Icon } from "./Icon";
|
|||||||
import { PerformerLink } from "./TagLink";
|
import { PerformerLink } from "./TagLink";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
performers: Partial<GQL.PerformerDataFragment>[];
|
performers: Pick<
|
||||||
|
GQL.Performer,
|
||||||
|
"id" | "name" | "image_path" | "disambiguation" | "gender"
|
||||||
|
>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PerformerPopoverButton: React.FC<IProps> = ({ performers }) => {
|
export const PerformerPopoverButton: React.FC<IProps> = ({ performers }) => {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const CommonLinkComponent: React.FC<ICommonLinkProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
interface IPerformerLinkProps {
|
interface IPerformerLinkProps {
|
||||||
performer: INamedObject;
|
performer: INamedObject & { disambiguation?: string | null };
|
||||||
linkType?: "scene" | "gallery" | "image";
|
linkType?: "scene" | "gallery" | "image";
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,10 @@ export const PerformerLink: React.FC<IPerformerLinkProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<CommonLinkComponent link={link} className={className}>
|
<CommonLinkComponent link={link} className={className}>
|
||||||
{title}
|
<span>{title}</span>
|
||||||
|
{performer.disambiguation && (
|
||||||
|
<span className="performer-disambiguation">{` (${performer.disambiguation})`}</span>
|
||||||
|
)}
|
||||||
</CommonLinkComponent>
|
</CommonLinkComponent>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user