mirror of
https://github.com/stashapp/stash.git
synced 2026-04-17 20:42:26 +02:00
Implement studio as text option
This commit is contained in:
parent
aaece68d12
commit
41baa2d171
3 changed files with 9 additions and 4 deletions
|
|
@ -62,6 +62,7 @@ export const GalleryPage: React.FC<IProps> = ({ gallery, add }) => {
|
|||
const Toast = useToast();
|
||||
const intl = useIntl();
|
||||
const { configuration } = useConfigurationContext();
|
||||
const { showStudioText } = configuration?.ui ?? {};
|
||||
const showLightbox = useGalleryLightbox(gallery.id, gallery.chapters);
|
||||
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
|
|
@ -411,7 +412,7 @@ export const GalleryPage: React.FC<IProps> = ({ gallery, add }) => {
|
|||
<div className={`gallery-tabs ${collapsed ? "collapsed" : ""}`}>
|
||||
<div>
|
||||
<div className="gallery-header-container">
|
||||
<StudioLogo studio={gallery.studio} />
|
||||
<StudioLogo studio={gallery.studio} showText={showStudioText} />
|
||||
<h3
|
||||
className={cx("gallery-header", { "no-studio": !gallery.studio })}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ const ScenePage: React.FC<IProps> = PatchComponent("ScenePage", (props) => {
|
|||
const [updateScene] = useSceneUpdate();
|
||||
const [generateScreenshot] = useSceneGenerateScreenshot();
|
||||
const { configuration } = useConfigurationContext();
|
||||
const { showStudioText } = configuration?.ui ?? {};
|
||||
|
||||
const [showDraftModal, setShowDraftModal] = useState(false);
|
||||
const boxes = configuration?.general?.stashBoxes ?? [];
|
||||
|
|
@ -675,7 +676,7 @@ const ScenePage: React.FC<IProps> = PatchComponent("ScenePage", (props) => {
|
|||
>
|
||||
<div>
|
||||
<div className="scene-header-container">
|
||||
<StudioLogo studio={scene.studio} />
|
||||
<StudioLogo studio={scene.studio} showText={showStudioText} />
|
||||
<h3 className={cx("scene-header", { "no-studio": !scene.studio })}>
|
||||
<TruncatedText lineCount={2} text={title} />
|
||||
</h3>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@ import { faVideo } from "@fortawesome/free-solid-svg-icons";
|
|||
|
||||
export const StudioLogo: React.FC<{
|
||||
studio: Pick<Studio, "id" | "image_path" | "name"> | undefined | null;
|
||||
}> = ({ studio }) => {
|
||||
showText?: boolean;
|
||||
}> = ({ studio, showText = false }) => {
|
||||
if (!studio) return null;
|
||||
|
||||
const hasLogo =
|
||||
studio.image_path && !studio.image_path.endsWith("default=true");
|
||||
!showText &&
|
||||
studio.image_path &&
|
||||
!studio.image_path.endsWith("default=true");
|
||||
|
||||
return (
|
||||
<h1 className="text-center studio-logo">
|
||||
|
|
|
|||
Loading…
Reference in a new issue