Enhanced Titles for Scene Page

support for line break
This commit is contained in:
Herpes3000 2024-11-08 23:03:41 +02:00
parent 908081e82c
commit 74e4cc9325
2 changed files with 16 additions and 3 deletions

View file

@ -50,6 +50,7 @@ import { useRatingKeybinds } from "src/hooks/keybinds";
import { lazyComponent } from "src/utils/lazyComponent";
import cx from "classnames";
import { TruncatedText } from "src/components/Shared/TruncatedText";
import { TitleDisplay } from 'src/components/Shared/TitleDisplay';
const SubmitStashBoxDraft = lazyComponent(
() => import("src/components/Dialogs/SubmitDraft")
@ -583,9 +584,12 @@ const ScenePage: React.FC<IProps> = ({
</Link>
</h1>
)}
<h3 className={cx("scene-header", { "no-studio": !scene.studio })}>
<TruncatedText lineCount={2} text={title} />
</h3>
<h3 className={cx("scene-header", { "no-studio": !scene.studio })}>
<TruncatedText
lineCount={2}
text={<TitleDisplay text={String(title)} className="title-display" />}
/>
</h3>
</div>
<div className="scene-subheader">

View file

@ -899,3 +899,12 @@ input[type="range"].blue-slider {
word-break: break-all;
}
}
.title-display {
width: 100%;
br {
display: block;
content: "";
margin: 2px 0;
}
}