[Glitch] Add duration parameter to muting.

Port 96761752ec to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
OSAMU SATO
2020-10-13 08:01:14 +09:00
committed by Thibaut Girka
parent 813c84cd6c
commit 78ad04420c
7 changed files with 81 additions and 8 deletions

View File

@ -8,6 +8,7 @@ import IconButton from './icon_button';
import { defineMessages, injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { me } from 'flavours/glitch/util/initial_state';
import RelativeTimestamp from './relative_timestamp';
const messages = defineMessages({
follow: { id: 'account.follow', defaultMessage: 'Follow' },
@ -116,6 +117,11 @@ class Account extends ImmutablePureComponent {
}
}
let mute_expires_at;
if (account.get('mute_expires_at')) {
mute_expires_at = <div><RelativeTimestamp timestamp={account.get('mute_expires_at')} futureDate /></div>;
}
return small ? (
<Permalink
className='account small'
@ -138,6 +144,7 @@ class Account extends ImmutablePureComponent {
<div className='account__wrapper'>
<Permalink key={account.get('id')} className='account__display-name' href={account.get('url')} to={`/accounts/${account.get('id')}`}>
<div className='account__avatar-wrapper'><Avatar account={account} size={36} /></div>
{mute_expires_at}
<DisplayName account={account} />
</Permalink>
{buttons ?