chore: prettier formatting for P0 feature files
CI / Build & Quality Checks (push) Failing after 5m39s
CI / Build & Quality Checks (push) Failing after 5m39s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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