mirror of
https://github.com/stashapp/stash.git
synced 2025-12-07 00:43:12 +01:00
Show performer image in select (#4227)
This commit is contained in:
parent
c4d7a7ab2c
commit
552f86586a
3 changed files with 24 additions and 3 deletions
|
|
@ -40,4 +40,5 @@ fragment SelectPerformerData on Performer {
|
||||||
name
|
name
|
||||||
disambiguation
|
disambiguation
|
||||||
alias_list
|
alias_list
|
||||||
|
image_path
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ export type SelectObject = {
|
||||||
|
|
||||||
export type Performer = Pick<
|
export type Performer = Pick<
|
||||||
GQL.Performer,
|
GQL.Performer,
|
||||||
"id" | "name" | "alias_list" | "disambiguation"
|
"id" | "name" | "alias_list" | "disambiguation" | "image_path"
|
||||||
>;
|
>;
|
||||||
type Option = SelectOption<Performer>;
|
type Option = SelectOption<Performer>;
|
||||||
|
|
||||||
|
|
@ -86,6 +86,18 @@ export const PerformerSelect: React.FC<
|
||||||
...optionProps,
|
...optionProps,
|
||||||
children: (
|
children: (
|
||||||
<span>
|
<span>
|
||||||
|
<a
|
||||||
|
href={`/performers/${object.id}`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
className="performer-select-image-link"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
className="performer-select-image"
|
||||||
|
src={object.image_path ?? ""}
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
<span>{name}</span>
|
<span>{name}</span>
|
||||||
{object.disambiguation && (
|
{object.disambiguation && (
|
||||||
<span className="performer-disambiguation">{` (${object.disambiguation})`}</span>
|
<span className="performer-disambiguation">{` (${object.disambiguation})`}</span>
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.performer-select .alias {
|
.performer-select {
|
||||||
font-weight: bold;
|
.alias {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.performer-select-image {
|
||||||
|
margin-right: 0.5em;
|
||||||
|
max-height: 50px;
|
||||||
|
max-width: 50px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue