[Glitch] Improve relative time display when post time is in the future
Port 8733d09dc49ef0642599f5590fb3615390112ab5 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
664f158994
commit
0710f78470
@ -398,7 +398,10 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||
|
||||
<div className='status__action-bar-spacer' />
|
||||
<a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener'>
|
||||
<RelativeTimestamp timestamp={status.get('created_at')} />{status.get('edited_at') && <abbr title={intl.formatMessage(messages.edited, { date: intl.formatDate(status.get('edited_at'), { year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) })}> *</abbr>}
|
||||
<RelativeTimestamp
|
||||
timestamp={status.get('created_at')}
|
||||
noFuture
|
||||
/>{status.get('edited_at') && <abbr title={intl.formatMessage(messages.edited, { date: intl.formatDate(status.get('edited_at'), { year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) })}> *</abbr>}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -36,7 +36,10 @@ export const AccountStatusHeader: FC<StatusHeaderProps> = ({
|
||||
className='status__relative-time'
|
||||
>
|
||||
<StatusVisibility visibility={status.get('visibility')} />
|
||||
<RelativeTimestamp timestamp={status.get('created_at') as string} />
|
||||
<RelativeTimestamp
|
||||
timestamp={status.get('created_at') as string}
|
||||
noFuture
|
||||
/>
|
||||
{editedAt && <StatusEditedAt editedAt={editedAt} />}
|
||||
</Link>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user