Show pencil icon on edited statuses
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
b8be588b60
commit
7a7db0a4c2
2 changed files with 12 additions and 1 deletions
|
@ -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'>·</Text>
|
||||
|
||||
<Icon className='h-5 w-5 stroke-[1.35]' src={require('@tabler/icons/icons/pencil.svg')} />
|
||||
</>
|
||||
) : null}
|
||||
</HStack>
|
||||
</div>
|
||||
</HStack>
|
||||
|
|
|
@ -631,6 +631,7 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
|
|||
timestampUrl={statusUrl}
|
||||
action={reblogElement}
|
||||
hideActions={!reblogElement}
|
||||
showEdit={!!status.edited_at}
|
||||
/>
|
||||
</HStack>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue