This commit is contained in:
Infinite
2020-01-03 22:29:21 +01:00
parent 716c33fc8e
commit 4d44deff64
128 changed files with 28709 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import React, { } from "react";
import { Link } from "react-router-dom";
import * as GQL from "../../core/generated-graphql";
export class SceneHelpers {
public static maybeRenderStudio(
scene: GQL.SceneDataFragment | GQL.SlimSceneDataFragment,
height: number
) {
if (!scene.studio)
return;
const style: React.CSSProperties = {
backgroundImage: `url('${scene.studio.image_path}')`,
width: "100%",
height: `${height}px`,
lineHeight: 5,
backgroundSize: "contain",
display: "inline-block",
backgroundPosition: "center",
backgroundRepeat: "no-repeat",
};
return (
<Link
to={`/studios/${scene.studio.id}`}
style={style}
/>
);
}
public static getJWPlayerId(): string { return "main-jwplayer"; }
public static getPlayer(): any {
return (window as any).jwplayer("main-jwplayer");
}
}