Show pencil icon on edited statuses

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
merge-requests/1271/head
marcin mikołajczak 2022-05-03 23:13:29 +02:00
rodzic b8be588b60
commit 7a7db0a4c2
2 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -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<HTMLDivElement>(null);
const actionRef = React.useRef<HTMLDivElement>(null);
@ -207,6 +209,14 @@ const Account = ({
)}
</>
) : null}
{showEdit ? (
<>
<Text tag='span' theme='muted' size='sm'>&middot;</Text>
<Icon className='h-5 w-5 stroke-[1.35]' src={require('@tabler/icons/icons/pencil.svg')} />
</>
) : null}
</HStack>
</div>
</HStack>

Wyświetl plik

@ -631,6 +631,7 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
timestampUrl={statusUrl}
action={reblogElement}
hideActions={!reblogElement}
showEdit={!!status.edited_at}
/>
</HStack>
</div>