mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Truncate custom field display to 5 lines
This commit is contained in:
parent
e213fde0cc
commit
a03b860624
2 changed files with 14 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import { Icon } from "./Icon";
|
||||||
import { faMinus, faPlus } from "@fortawesome/free-solid-svg-icons";
|
import { faMinus, faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||||
import cx from "classnames";
|
import cx from "classnames";
|
||||||
import { PatchComponent } from "src/patch";
|
import { PatchComponent } from "src/patch";
|
||||||
|
import { TruncatedText } from "./TruncatedText";
|
||||||
|
|
||||||
const maxFieldNameLength = 64;
|
const maxFieldNameLength = 64;
|
||||||
|
|
||||||
|
|
@ -47,7 +48,7 @@ const CustomField: React.FC<{ field: string; value: unknown }> = ({
|
||||||
id={id}
|
id={id}
|
||||||
label={field}
|
label={field}
|
||||||
labelTitle={field}
|
labelTitle={field}
|
||||||
value={valueStr}
|
value={<TruncatedText lineCount={5} text={<>{valueStr}</>} />}
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
showEmpty
|
showEmpty
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -712,6 +712,10 @@ button.btn.favorite-button {
|
||||||
|
|
||||||
.custom-fields {
|
.custom-fields {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
.detail-item {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-fields .detail-item .detail-item-title {
|
.custom-fields .detail-item .detail-item-title {
|
||||||
|
|
@ -721,6 +725,14 @@ button.btn.favorite-button {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custom-fields .detail-item .detail-item-value {
|
||||||
|
word-break: break-word;
|
||||||
|
|
||||||
|
.TruncatedText {
|
||||||
|
white-space: pre-line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.custom-fields-input > .collapse-button {
|
.custom-fields-input > .collapse-button {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue