From 7a7db0a4c2850ec14e9404ec28d7745e36903ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 3 May 2022 23:13:29 +0200 Subject: [PATCH] Show pencil icon on edited statuses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/account.tsx | 12 +++++++++++- app/soapbox/components/status.tsx | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/soapbox/components/account.tsx b/app/soapbox/components/account.tsx index 36f8c1b26..77a9d1a91 100644 --- a/app/soapbox/components/account.tsx +++ b/app/soapbox/components/account.tsx @@ -9,7 +9,7 @@ import { getAcct } from 'soapbox/utils/accounts'; import { displayFqn } from 'soapbox/utils/state'; import RelativeTimestamp from './relative_timestamp'; -import { Avatar, HStack, IconButton, Text } from './ui'; +import { Avatar, HStack, Icon, IconButton, Text } from './ui'; import type { Account as AccountEntity } from 'soapbox/types/entities'; @@ -56,6 +56,7 @@ interface IAccount { timestampUrl?: string, withDate?: boolean, withRelationship?: boolean, + showEdit?: boolean, } const Account = ({ @@ -73,6 +74,7 @@ const Account = ({ timestampUrl, withDate = false, withRelationship = true, + showEdit = false, }: IAccount) => { const overflowRef = React.useRef(null); const actionRef = React.useRef(null); @@ -207,6 +209,14 @@ const Account = ({ )} ) : null} + + {showEdit ? ( + <> + · + + + + ) : null} diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index 727d491c5..60c6ebcdb 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -631,6 +631,7 @@ class Status extends ImmutablePureComponent { timestampUrl={statusUrl} action={reblogElement} hideActions={!reblogElement} + showEdit={!!status.edited_at} />