From 94b5d2203457d739faeec2cbe6d2b95c1c75b29d Mon Sep 17 00:00:00 2001 From: larentoun <31931237+larentoun@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:40:41 +0300 Subject: [PATCH] Records Multiline (#24991) * pre-wrap for labeledlist * multiline for pdas * consoles fix * update tgui * update tgui bundle --- tgui/packages/tgui/components/LabeledList.tsx | 3 + .../tgui/interfaces/MedicalRecords.js | 11 +- .../tgui/interfaces/SecurityRecords.js | 10 +- .../tgui/interfaces/common/SimpleRecords.js | 4 +- tgui/public/tgui-panel.bundle.js | 122 +++++++++--------- tgui/public/tgui.bundle.js | 36 +++--- 6 files changed, 96 insertions(+), 90 deletions(-) diff --git a/tgui/packages/tgui/components/LabeledList.tsx b/tgui/packages/tgui/components/LabeledList.tsx index 76036a6ff56..9cb9dfea0d0 100644 --- a/tgui/packages/tgui/components/LabeledList.tsx +++ b/tgui/packages/tgui/components/LabeledList.tsx @@ -29,6 +29,7 @@ type LabeledListItemProps = { textAlign?: string | BooleanLike; buttons?: InfernoNode; tooltip?: string | BooleanLike; + preserveWhitespace?: BooleanLike; /** @deprecated */ content?: any; children?: InfernoNode; @@ -45,6 +46,7 @@ const LabeledListItem = (props: LabeledListItemProps) => { tooltip, content, children, + preserveWhitespace, } = props; let listItem = ( @@ -61,6 +63,7 @@ const LabeledListItem = (props: LabeledListItemProps) => { textAlign={textAlign} className={classes(['LabeledList__cell', 'LabeledList__content'])} colSpan={buttons ? undefined : 2} + preserveWhitespace={preserveWhitespace} > {content} {children} diff --git a/tgui/packages/tgui/interfaces/MedicalRecords.js b/tgui/packages/tgui/interfaces/MedicalRecords.js index 0c624b1da25..6c998a4018d 100644 --- a/tgui/packages/tgui/interfaces/MedicalRecords.js +++ b/tgui/packages/tgui/interfaces/MedicalRecords.js @@ -1,4 +1,4 @@ -import { createSearch } from 'common/string'; +import { createSearch, decodeHtmlEntities } from 'common/string'; import { useBackend, useLocalState } from '../backend'; import { Box, @@ -394,14 +394,13 @@ const MedicalRecordsViewMedical = (_properties, context) => { {medical.fields.map((field, i) => ( - - - {field.value} - + + {decodeHtmlEntities(field.value)} {!!field.edit && (