fix sds resizing

This commit is contained in:
nocnico
2025-06-08 13:36:11 +02:00
parent fa3757e1ee
commit fc3272bca5

View File

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