mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
parent
da2640b7ba
commit
eeac6df122
3 changed files with 17 additions and 4 deletions
|
@ -36,6 +36,7 @@ import { Layout } from "../../../settings/enums/Layout";
|
|||
import { formatTime } from "../../../DateUtils";
|
||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||
import DecryptionFailureBody from "../messages/DecryptionFailureBody";
|
||||
import { E2EState } from "./E2EIcon";
|
||||
import RoomAvatar from "../avatars/RoomAvatar";
|
||||
import MessageContextMenu from "../context_menus/MessageContextMenu";
|
||||
|
@ -1329,6 +1330,8 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
|||
<div className="mx_EventTile_body">
|
||||
{this.props.mxEvent.isRedacted() ? (
|
||||
<RedactedBody mxEvent={this.props.mxEvent} />
|
||||
) : this.props.mxEvent.isDecryptionFailure() ? (
|
||||
<DecryptionFailureBody />
|
||||
) : (
|
||||
MessagePreviewStore.instance.generatePreviewForEvent(this.props.mxEvent)
|
||||
)}
|
||||
|
|
|
@ -109,9 +109,19 @@ export const ThreadMessagePreview = ({ thread, showDisplayname = false }: IPrevi
|
|||
{showDisplayname && (
|
||||
<div className="mx_ThreadSummary_sender">{lastReply.sender?.name ?? lastReply.getSender()}</div>
|
||||
)}
|
||||
<div className="mx_ThreadSummary_content" title={preview}>
|
||||
<span className="mx_ThreadSummary_message-preview">{preview}</span>
|
||||
</div>
|
||||
|
||||
{lastReply.isDecryptionFailure() ? (
|
||||
<div
|
||||
className="mx_ThreadSummary_content mx_DecryptionFailureBody"
|
||||
title={_t("Unable to decrypt message")}
|
||||
>
|
||||
<span className="mx_ThreadSummary_message-preview">{_t("Unable to decrypt message")}</span>
|
||||
</div>
|
||||
) : (
|
||||
<div className="mx_ThreadSummary_content" title={preview}>
|
||||
<span className="mx_ThreadSummary_message-preview">{preview}</span>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -2126,6 +2126,7 @@
|
|||
"%(count)s reply|other": "%(count)s replies",
|
||||
"%(count)s reply|one": "%(count)s reply",
|
||||
"Open thread": "Open thread",
|
||||
"Unable to decrypt message": "Unable to decrypt message",
|
||||
"Jump to first unread message.": "Jump to first unread message.",
|
||||
"Unable to access your microphone": "Unable to access your microphone",
|
||||
"We were unable to access your microphone. Please check your browser settings and try again.": "We were unable to access your microphone. Please check your browser settings and try again.",
|
||||
|
@ -2311,7 +2312,6 @@
|
|||
"Last month": "Last month",
|
||||
"The beginning of the room": "The beginning of the room",
|
||||
"Jump to date": "Jump to date",
|
||||
"Unable to decrypt message": "Unable to decrypt message",
|
||||
"Downloading": "Downloading",
|
||||
"Decrypting": "Decrypting",
|
||||
"Download": "Download",
|
||||
|
|
Loading…
Reference in a new issue