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 { displayFqn } from 'soapbox/utils/state';
|
||||||
|
|
||||||
import RelativeTimestamp from './relative_timestamp';
|
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';
|
import type { Account as AccountEntity } from 'soapbox/types/entities';
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ interface IAccount {
|
||||||
timestampUrl?: string,
|
timestampUrl?: string,
|
||||||
withDate?: boolean,
|
withDate?: boolean,
|
||||||
withRelationship?: boolean,
|
withRelationship?: boolean,
|
||||||
|
showEdit?: boolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
const Account = ({
|
const Account = ({
|
||||||
|
@ -73,6 +74,7 @@ const Account = ({
|
||||||
timestampUrl,
|
timestampUrl,
|
||||||
withDate = false,
|
withDate = false,
|
||||||
withRelationship = true,
|
withRelationship = true,
|
||||||
|
showEdit = false,
|
||||||
}: IAccount) => {
|
}: IAccount) => {
|
||||||
const overflowRef = React.useRef<HTMLDivElement>(null);
|
const overflowRef = React.useRef<HTMLDivElement>(null);
|
||||||
const actionRef = React.useRef<HTMLDivElement>(null);
|
const actionRef = React.useRef<HTMLDivElement>(null);
|
||||||
|
@ -207,6 +209,14 @@ const Account = ({
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : 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>
|
</HStack>
|
||||||
</div>
|
</div>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
|
|
@ -631,6 +631,7 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
|
||||||
timestampUrl={statusUrl}
|
timestampUrl={statusUrl}
|
||||||
action={reblogElement}
|
action={reblogElement}
|
||||||
hideActions={!reblogElement}
|
hideActions={!reblogElement}
|
||||||
|
showEdit={!!status.edited_at}
|
||||||
/>
|
/>
|
||||||
</HStack>
|
</HStack>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue