diff --git a/src/components/views/dialogs/ExportDialog.tsx b/src/components/views/dialogs/ExportDialog.tsx index 64cac3364a..b1de882950 100644 --- a/src/components/views/dialogs/ExportDialog.tsx +++ b/src/components/views/dialogs/ExportDialog.tsx @@ -193,7 +193,7 @@ const ExportDialog: React.FC = ({ room, onFinished }) => { const exportTypeOptions = Object.keys(exportTypes).map((type) => { return ( ); }); @@ -229,7 +229,7 @@ const ExportDialog: React.FC = ({ room, onFinished }) => {

{ _t("The export was cancelled successfully") }

@@ -331,9 +331,9 @@ const ExportDialog: React.FC = ({ room, onFinished }) => { fixedWidth={true} >

- {_t( + { _t( "Are you sure you want to stop exporting your data? If you do, you'll need to start over.", - )} + ) }

{ placeholder = (
- {this.props.forExport ? + { this.props.forExport ? Attachment - : null} + : null } { presentableTextForFile(content, false) } diff --git a/src/components/views/right_panel/RoomSummaryCard.tsx b/src/components/views/right_panel/RoomSummaryCard.tsx index b0d8070b8c..c1b4112423 100644 --- a/src/components/views/right_panel/RoomSummaryCard.tsx +++ b/src/components/views/right_panel/RoomSummaryCard.tsx @@ -287,8 +287,8 @@ const RoomSummaryCard: React.FC = ({ room, onClose }) => { - diff --git a/src/utils/exportUtils/HtmlExport.tsx b/src/utils/exportUtils/HtmlExport.tsx index e545a32a17..5b1b8ee8c7 100644 --- a/src/utils/exportUtils/HtmlExport.tsx +++ b/src/utils/exportUtils/HtmlExport.tsx @@ -63,7 +63,7 @@ export default class HTMLExporter extends Exporter { name={this.room.name} title={this.room.name} url={blob ? avatarPath : null} - resizeMethod={"crop"} + resizeMethod="crop" /> ); return renderToStaticMarkup(avatar); @@ -83,31 +83,31 @@ export default class HTMLExporter extends Exporter { const exportedText = renderToStaticMarkup(

- {_t( + { _t( "This is the start of export of . Exported by at %(exportDate)s.", { exportDate, }, { - roomName: () => {this.room.name}, + roomName: () => { this.room.name }, exporterDetails: () => ( - {exporterName ? ( + { exporterName ? ( <> - {exporterName} - {exporter} + { exporterName } + { exporter } ) : ( - {exporter} - )} + { exporter } + ) } ), }, - )} + ) }

, ); @@ -232,7 +232,7 @@ export default class HTMLExporter extends Exporter { return renderToStaticMarkup(dateSeparator); } - protected _wantsDateSeparator(event: MatrixEvent, prevEvent: MatrixEvent) { + protected needsDateSeparator(event: MatrixEvent, prevEvent: MatrixEvent) { if (prevEvent == null) return true; return wantsDateSeparator(prevEvent.getDate(), event.getDate()); } @@ -341,8 +341,8 @@ export default class HTMLExporter extends Exporter { if (this.cancelled) return this.cleanUp(); if (!haveTileForEvent(event)) continue; - content += this._wantsDateSeparator(event, prevEvent) ? this.getDateSeparator(event) : ""; - const shouldBeJoined = !this._wantsDateSeparator(event, prevEvent) + content += this.needsDateSeparator(event, prevEvent) ? this.getDateSeparator(event) : ""; + const shouldBeJoined = !this.needsDateSeparator(event, prevEvent) && shouldFormContinuation(prevEvent, event, false); const body = await this.createMessageBody(event, shouldBeJoined); this.totalSize += Buffer.byteLength(body); diff --git a/src/utils/exportUtils/PlainTextExport.ts b/src/utils/exportUtils/PlainTextExport.ts index 00efab0f33..feb4afe618 100644 --- a/src/utils/exportUtils/PlainTextExport.ts +++ b/src/utils/exportUtils/PlainTextExport.ts @@ -59,7 +59,7 @@ export default class PlainTextExporter extends Exporter { return `<${rplName}${rplSource}> ${rplText}`; }; - protected _textForEvent = async (mxEv: MatrixEvent) => { + protected plainTextForEvent = async (mxEv: MatrixEvent) => { const senderDisplayName = mxEv.sender && mxEv.sender.name ? mxEv.sender.name : mxEv.getSender(); let mediaText = ""; if (this.isAttachment(mxEv)) { @@ -94,7 +94,7 @@ export default class PlainTextExporter extends Exporter { this.updateProgress(`Processing event ${i + 1} out of ${events.length}`, false, true); if (this.cancelled) return this.cleanUp(); if (!haveTileForEvent(event)) continue; - const textForEvent = await this._textForEvent(event); + const textForEvent = await this.plainTextForEvent(event); content += textForEvent && `${new Date(event.getTs()).toLocaleString()} - ${textForEvent}\n`; } return content;