mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +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
|
||||
disambiguation
|
||||
alias_list
|
||||
image_path
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export type SelectObject = {
|
|||
|
||||
export type Performer = Pick<
|
||||
GQL.Performer,
|
||||
"id" | "name" | "alias_list" | "disambiguation"
|
||||
"id" | "name" | "alias_list" | "disambiguation" | "image_path"
|
||||
>;
|
||||
type Option = SelectOption<Performer>;
|
||||
|
||||
|
|
@ -86,6 +86,18 @@ export const PerformerSelect: React.FC<
|
|||
...optionProps,
|
||||
children: (
|
||||
<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>
|
||||
{object.disambiguation && (
|
||||
<span className="performer-disambiguation">{` (${object.disambiguation})`}</span>
|
||||
|
|
|
|||
|
|
@ -221,6 +221,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
.performer-select .alias {
|
||||
font-weight: bold;
|
||||
.performer-select {
|
||||
.alias {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.performer-select-image {
|
||||
margin-right: 0.5em;
|
||||
max-height: 50px;
|
||||
max-width: 50px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue