mirror of
https://github.com/stashapp/stash.git
synced 2026-03-26 07:01:54 +01:00
Use StashIDPill in the performer modal dialog (#6655)
Currently, this dialog just shows a text "Stash-Box Source". This change instead re-uses the StashIDPill, with the main advantage that you can immediately tell which stash box is being used.
This commit is contained in:
parent
74a8f2e5d5
commit
cacaf36347
1 changed files with 6 additions and 8 deletions
|
|
@ -15,10 +15,10 @@ import {
|
|||
faArrowLeft,
|
||||
faArrowRight,
|
||||
faCheck,
|
||||
faExternalLinkAlt,
|
||||
faTimes,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { ExternalLink } from "../Shared/ExternalLink";
|
||||
import { StashIDPill } from "../Shared/StashID";
|
||||
|
||||
interface IPerformerModalProps {
|
||||
performer: GQL.ScrapedScenePerformerDataFragment;
|
||||
|
|
@ -208,15 +208,13 @@ const PerformerModal: React.FC<IPerformerModalProps> = ({
|
|||
|
||||
function maybeRenderStashBoxLink() {
|
||||
const base = endpoint?.match(/https?:\/\/.*?\//)?.[0];
|
||||
if (!base) return;
|
||||
if (!base || !performer.remote_site_id) return;
|
||||
|
||||
return (
|
||||
<h6 className="mt-2">
|
||||
<ExternalLink href={`${base}performers/${performer.remote_site_id}`}>
|
||||
<FormattedMessage id="stashbox.source" />
|
||||
<Icon icon={faExternalLinkAlt} className="ml-2" />
|
||||
</ExternalLink>
|
||||
</h6>
|
||||
<StashIDPill
|
||||
linkType="performers"
|
||||
stashID={{ endpoint: endpoint, stash_id: performer.remote_site_id }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue