Stash-box tagger integration (#454)

This commit is contained in:
InfiniteTF
2020-10-24 05:31:39 +02:00
committed by GitHub
parent 70f73ecf4a
commit 3346f8dcca
75 changed files with 3007 additions and 79 deletions

View File

@@ -189,6 +189,39 @@ export const SceneFileInfoPanel: React.FC<ISceneFileInfoPanelProps> = (
);
}
function renderStashIDs() {
if (!props.scene.stash_ids.length) {
return;
}
return (
<div className="row">
<span className="col-4">StashIDs</span>
<ul className="col-8">
{props.scene.stash_ids.map((stashID) => {
const base = stashID.endpoint.match(/https?:\/\/.*?\//)?.[0];
const link = base ? (
<a
href={`${base}scenes/${stashID.stash_id}`}
target="_blank"
rel="noopener noreferrer"
>
{stashID.stash_id}
</a>
) : (
stashID.stash_id
);
return (
<li key={stashID.stash_id} className="row no-gutters">
{link}
</li>
);
})}
</ul>
</div>
);
}
return (
<div className="container scene-file-info">
{renderOSHash()}
@@ -203,6 +236,7 @@ export const SceneFileInfoPanel: React.FC<ISceneFileInfoPanelProps> = (
{renderVideoCodec()}
{renderAudioCodec()}
{renderUrl()}
{renderStashIDs()}
</div>
);
};