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">
|
<Box className={css.ModalContent} direction="Column" gap="100">
|
||||||
<Text size="T300" className={css.ModalTopic} priority="400">
|
<Text size="T300" className={css.ModalTopic} priority="400">
|
||||||
{isFormatted ? (
|
{isFormatted ? (
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
||||||
parse(sanitizeCustomHtml((topic as RoomTopicContent).formatted_body!))
|
parse(sanitizeCustomHtml((topic as RoomTopicContent).formatted_body!))
|
||||||
) : (
|
) : (
|
||||||
<Linkify options={LINKIFY_OPTS}>{scaleSystemEmoji(topicStr)}</Linkify>
|
<Linkify options={LINKIFY_OPTS}>{scaleSystemEmoji(topicStr)}</Linkify>
|
||||||
|
|||||||
@@ -1125,9 +1125,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
|
|||||||
msgType={mEvent.getContent().msgtype ?? ''}
|
msgType={mEvent.getContent().msgtype ?? ''}
|
||||||
ts={mEvent.getTs()}
|
ts={mEvent.getTs()}
|
||||||
edited={!!editedEvent}
|
edited={!!editedEvent}
|
||||||
onEditHistoryClick={
|
onEditHistoryClick={editedEvent ? () => setEditHistoryEvent(mEvent) : undefined}
|
||||||
editedEvent ? () => setEditHistoryEvent(mEvent) : undefined
|
|
||||||
}
|
|
||||||
getContent={getContent}
|
getContent={getContent}
|
||||||
mediaAutoLoad={mediaAutoLoad}
|
mediaAutoLoad={mediaAutoLoad}
|
||||||
urlPreview={showUrlPreview}
|
urlPreview={showUrlPreview}
|
||||||
|
|||||||
@@ -50,10 +50,16 @@ export function EditHistoryModal({ room, mEvent, onClose }: EditHistoryModalProp
|
|||||||
const rawEvents = res.chunk ?? [];
|
const rawEvents = res.chunk ?? [];
|
||||||
// Sort oldest first
|
// Sort oldest first
|
||||||
const events = rawEvents
|
const events = rawEvents
|
||||||
.map((raw) => {
|
.map(
|
||||||
// Build a lightweight representation for display; we just need content + ts
|
(raw) =>
|
||||||
return raw as { type: string; content: Record<string, unknown>; origin_server_ts: number; event_id: string };
|
// 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);
|
.sort((a, b) => a.origin_server_ts - b.origin_server_ts);
|
||||||
|
|
||||||
// Convert to MatrixEvent-like objects using the raw data
|
// 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">
|
<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">
|
<Box grow="Yes">
|
||||||
<Text as="h2" size="H4" truncate>
|
<Text as="h2" size="H4" truncate>
|
||||||
Edit History
|
Edit History
|
||||||
@@ -125,9 +135,20 @@ export function EditHistoryModal({ room, mEvent, onClose }: EditHistoryModalProp
|
|||||||
</Header>
|
</Header>
|
||||||
|
|
||||||
<Scroll size="300" hideTrack style={{ maxHeight: '60vh' }}>
|
<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 && (
|
{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" />
|
<Spinner size="200" />
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
@@ -163,7 +184,10 @@ export function EditHistoryModal({ room, mEvent, onClose }: EditHistoryModalProp
|
|||||||
{formatTs(editEvt.getTs())}
|
{formatTs(editEvt.getTs())}
|
||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Text size="T300" style={{ whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}>
|
<Text
|
||||||
|
size="T300"
|
||||||
|
style={{ whiteSpace: 'pre-wrap', wordBreak: 'break-word' }}
|
||||||
|
>
|
||||||
{getVersionBody(editEvt)}
|
{getVersionBody(editEvt)}
|
||||||
</Text>
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user