diff options
author | OSAMU SATO <satosamu@gmail.com> | 2020-10-13 08:01:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 01:01:14 +0200 |
commit | 96761752eccfc0d239974a24e0cc2d74c6aee7ac (patch) | |
tree | 1590275b4f8a1f954d90e870ef2bfb8ac00d7109 /app/javascript/mastodon/components | |
parent | f54ca3d08e068af07a5b7a8b139e7658b3236db8 (diff) |
Add duration parameter to muting. (#13831)
* Adding duration to muting. * Remove useless checks
Diffstat (limited to 'app/javascript/mastodon/components')
-rw-r--r-- | app/javascript/mastodon/components/account.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/javascript/mastodon/components/account.js b/app/javascript/mastodon/components/account.js index 2705a6001..0e40ee1d6 100644 --- a/app/javascript/mastodon/components/account.js +++ b/app/javascript/mastodon/components/account.js @@ -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 '../initial_state'; +import RelativeTimestamp from './relative_timestamp'; const messages = defineMessages({ follow: { id: 'account.follow', defaultMessage: 'Follow' }, @@ -107,11 +108,17 @@ 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 ( <div className='account'> <div className='account__wrapper'> <Permalink key={account.get('id')} className='account__display-name' title={account.get('acct')} 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> |