Iterate io.element.late_event decoration (#11760)

* Update copy

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add icon to late event timestamp

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshot

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2023-10-17 13:31:41 +01:00 committed by GitHub
parent fd08e74275
commit 4ff307b562
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 3 deletions

View file

@ -15,11 +15,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from "react";
import React, { ReactNode } from "react";
import { Tooltip } from "@vector-im/compound-web";
import { formatFullDate, formatTime, formatFullTime, formatRelativeTime } from "../../../DateUtils";
import { _t } from "../../../languageHandler";
import { Icon as LateIcon } from "../../../../res/img/sensor.svg";
interface IProps {
ts: number;
@ -49,17 +50,20 @@ export default class MessageTimestamp extends React.Component<IProps> {
let label = formatFullDate(date, this.props.showTwelveHour);
let caption: string | undefined;
let icon: ReactNode | undefined;
if (this.props.receivedTs !== undefined) {
label = _t("timeline|message_timestamp_sent_at", { dateTime: label });
const receivedDate = new Date(this.props.receivedTs);
caption = _t("timeline|message_timestamp_received_at", {
dateTime: formatFullDate(receivedDate, this.props.showTwelveHour),
});
icon = <LateIcon className="mx_MessageTimestamp_lateIcon" width="16" height="16" />;
}
return (
<Tooltip label={label} caption={caption}>
<span className="mx_MessageTimestamp" aria-hidden={true} aria-live="off">
{icon}
{timestamp}
</span>
</Tooltip>

View file

@ -3418,7 +3418,7 @@
"label": "Message Actions",
"view_in_room": "View in room"
},
"message_timestamp_received_at": "Recovered at: %(dateTime)s",
"message_timestamp_received_at": "Received at: %(dateTime)s",
"message_timestamp_sent_at": "Sent at: %(dateTime)s",
"mjolnir": {
"changed_rule_glob": "%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",