]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js
1 import React
from 'react';
2 import PropTypes
from 'prop-types';
3 import ImmutablePropTypes
from 'react-immutable-proptypes';
4 import Permalink
from 'flavours/glitch/components/permalink';
5 import Avatar
from 'flavours/glitch/components/avatar';
6 import DisplayName
from 'flavours/glitch/components/display_name';
7 import IconButton
from 'flavours/glitch/components/icon_button';
8 import { defineMessages
, injectIntl
} from 'react-intl';
9 import ImmutablePureComponent
from 'react-immutable-pure-component';
11 const messages
= defineMessages({
12 authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' },
13 reject: { id: 'follow_request.reject', defaultMessage: 'Reject' },
17 export default class AccountAuthorize
extends ImmutablePureComponent
{
20 account: ImmutablePropTypes
.map
.isRequired
,
21 onAuthorize: PropTypes
.func
.isRequired
,
22 onReject: PropTypes
.func
.isRequired
,
23 intl: PropTypes
.object
.isRequired
,
27 const { intl
, account
, onAuthorize
, onReject
} = this.props
;
28 const content
= { __html: account
.get('note_emojified') };
31 <div className
='account-authorize__wrapper'>
32 <div className
='account-authorize'>
33 <Permalink href
={account
.get('url')} to
={`/accounts/${account.get('id')}`} className
='detailed-status__display-name'>
34 <div className
='account-authorize__avatar'><Avatar account
={account
} size
={48} /></div>
35 <DisplayName account
={account
} />
38 <div className
='account__header__content' dangerouslySetInnerHTML
={content
} />
41 <div className
='account--panel'>
42 <div className
='account--panel__button'><IconButton title
={intl
.formatMessage(messages
.authorize
)} icon
='check' onClick
={onAuthorize
} /></div>
43 <div className
='account--panel__button'><IconButton title
={intl
.formatMessage(messages
.reject
)} icon
='times' onClick
={onReject
} /></div>
This page took 0.128595 seconds and 4 git commands to generate.