chore: prettier formatting for P0 feature files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,6 @@ export const RoomTopicViewer = as<
|
||||
<Box className={css.ModalContent} direction="Column" gap="100">
|
||||
<Text size="T300" className={css.ModalTopic} priority="400">
|
||||
{isFormatted ? (
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
parse(sanitizeCustomHtml((topic as RoomTopicContent).formatted_body!))
|
||||
) : (
|
||||
<Linkify options={LINKIFY_OPTS}>{scaleSystemEmoji(topicStr)}</Linkify>
|
||||
|
||||
@@ -1125,9 +1125,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
|
||||
msgType={mEvent.getContent().msgtype ?? ''}
|
||||
ts={mEvent.getTs()}
|
||||
edited={!!editedEvent}
|
||||
onEditHistoryClick={
|
||||
editedEvent ? () => setEditHistoryEvent(mEvent) : undefined
|
||||
}
|
||||
onEditHistoryClick={editedEvent ? () => setEditHistoryEvent(mEvent) : undefined}
|
||||
getContent={getContent}
|
||||
mediaAutoLoad={mediaAutoLoad}
|
||||
urlPreview={showUrlPreview}
|
||||
|
||||
@@ -50,10 +50,16 @@ export function EditHistoryModal({ room, mEvent, onClose }: EditHistoryModalProp
|
||||
const rawEvents = res.chunk ?? [];
|
||||
// Sort oldest first
|
||||
const events = rawEvents
|
||||
.map((raw) => {
|
||||
// Build a lightweight representation for display; we just need content + ts
|
||||
return raw as { type: string; content: Record<string, unknown>; origin_server_ts: number; event_id: string };
|
||||
})
|
||||
.map(
|
||||
(raw) =>
|
||||
// Build a lightweight representation for display; we just need content + ts
|
||||
raw as {
|
||||
type: string;
|
||||
content: Record<string, unknown>;
|
||||
origin_server_ts: number;
|
||||
event_id: string;
|
||||
},
|
||||
)
|
||||
.sort((a, b) => a.origin_server_ts - b.origin_server_ts);
|
||||
|
||||
// Convert to MatrixEvent-like objects using the raw data
|
||||
@@ -113,7 +119,11 @@ export function EditHistoryModal({ room, mEvent, onClose }: EditHistoryModalProp
|
||||
}}
|
||||
>
|
||||
<Modal variant="Surface" size="500">
|
||||
<Header variant="Surface" size="500" style={{ padding: '0 var(--mx-spacing-s200) 0 var(--mx-spacing-s400)' }}>
|
||||
<Header
|
||||
variant="Surface"
|
||||
size="500"
|
||||
style={{ padding: '0 var(--mx-spacing-s200) 0 var(--mx-spacing-s400)' }}
|
||||
>
|
||||
<Box grow="Yes">
|
||||
<Text as="h2" size="H4" truncate>
|
||||
Edit History
|
||||
@@ -125,9 +135,20 @@ export function EditHistoryModal({ room, mEvent, onClose }: EditHistoryModalProp
|
||||
</Header>
|
||||
|
||||
<Scroll size="300" hideTrack style={{ maxHeight: '60vh' }}>
|
||||
<Box direction="Column" gap="200" style={{ padding: 'var(--mx-spacing-s400)', paddingBottom: 'var(--mx-spacing-s700)' }}>
|
||||
<Box
|
||||
direction="Column"
|
||||
gap="200"
|
||||
style={{
|
||||
padding: 'var(--mx-spacing-s400)',
|
||||
paddingBottom: 'var(--mx-spacing-s700)',
|
||||
}}
|
||||
>
|
||||
{historyState.status === AsyncStatus.Loading && (
|
||||
<Box justifyContent="Center" alignItems="Center" style={{ padding: 'var(--mx-spacing-s400)' }}>
|
||||
<Box
|
||||
justifyContent="Center"
|
||||
alignItems="Center"
|
||||
style={{ padding: 'var(--mx-spacing-s400)' }}
|
||||
>
|
||||
<Spinner size="200" />
|
||||
</Box>
|
||||
)}
|
||||
@@ -163,7 +184,10 @@ export function EditHistoryModal({ room, mEvent, onClose }: EditHistoryModalProp
|
||||
{formatTs(editEvt.getTs())}
|
||||
</Text>
|
||||
</Box>
|
||||
<Text size="T300" style={{ whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}>
|
||||
<Text
|
||||
size="T300"
|
||||
style={{ whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}
|
||||
>
|
||||
{getVersionBody(editEvt)}
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user