fix sds resizing
This commit is contained in:
@@ -132,10 +132,7 @@ export const useMrtStore = create<MrtStore>(
|
|||||||
}
|
}
|
||||||
case "sds": {
|
case "sds": {
|
||||||
const { sdsMessage } = pageData as SetSdsPageParams;
|
const { sdsMessage } = pageData as SetSdsPageParams;
|
||||||
const maxLen = 60;
|
|
||||||
const msg = sdsMessage.data.message;
|
const msg = sdsMessage.data.message;
|
||||||
const safeMsg =
|
|
||||||
typeof msg === "string" && msg.length > maxLen ? msg.slice(0, maxLen) + "…" : msg;
|
|
||||||
set({
|
set({
|
||||||
page: "sds",
|
page: "sds",
|
||||||
lines: [
|
lines: [
|
||||||
@@ -145,15 +142,17 @@ export const useMrtStore = create<MrtStore>(
|
|||||||
textSize: "2",
|
textSize: "2",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
textLeft: safeMsg,
|
textLeft: msg,
|
||||||
style: {
|
style: {
|
||||||
whiteSpace: "normal",
|
whiteSpace: "normal",
|
||||||
overflow: "hidden",
|
overflowWrap: "break-word",
|
||||||
textOverflow: "ellipsis",
|
|
||||||
maxWidth: "100%",
|
|
||||||
width: "100%",
|
|
||||||
display: "block",
|
|
||||||
wordBreak: "break-word",
|
wordBreak: "break-word",
|
||||||
|
display: "block",
|
||||||
|
maxWidth: "100%",
|
||||||
|
maxHeight: "100%",
|
||||||
|
overflow: "auto",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
lineHeight: "1.2em",
|
||||||
},
|
},
|
||||||
textSize: "2",
|
textSize: "2",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user