1 line
No EOL
9.7 KiB
Text
1 line
No EOL
9.7 KiB
Text
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/follow_requests/components/account_authorize.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/follow_requests/index.js"],"names":["messages","defineMessages","authorize","reject","AccountAuthorize","injectIntl","render","this","props","intl","account","onAuthorize","onReject","content","__html","get","className","href","to","size","dangerouslySetInnerHTML","title","formatMessage","icon","onClick","ImmutablePureComponent","ImmutablePropTypes","map","isRequired","PropTypes","func","object","connect","getAccount","makeGetAccount","state","id","dispatch","authorizeFollowRequest","rejectFollowRequest","heading","FollowRequests","accountIds","getIn","hasMore","locked","me","domain","expandFollowRequests","leading","componentWillMount","fetchFollowRequests","shouldUpdateScroll","multiColumn","emptyMessage","defaultMessage","unlockedPrependMessage","values","bindToDocument","scrollKey","onLoadMore","handleLoadMore","prepend","params","bool","list","string"],"mappings":"mVAUA,I,MAAMA,EAAWC,YAAe,CAC9BC,UAAU,CAAD,0DACTC,OAAO,CAAD,sDAIFC,EADUC,a,gHAUdC,OAAA,WAAW,IAAD,EACyCC,KAAKC,MAA9CC,EADA,EACAA,KAAMC,EADN,EACMA,QAASC,EADf,EACeA,YAAaC,EAD5B,EAC4BA,SAC9BC,EAAU,CAAEC,OAAQJ,EAAQK,IAAI,mBAEtC,OACE,mBAAKC,UAAU,mCAAf,EACE,mBAAKA,UAAU,0BAAf,EACE,YAAC,IAAD,CAAWC,KAAMP,EAAQK,IAAI,OAAQG,GAAE,aAAeR,EAAQK,IAAI,MAASC,UAAU,sCAArF,EACE,mBAAKA,UAAU,kCAAf,EAA2C,YAAC,IAAD,CAAQN,QAASA,EAASS,KAAM,MAC3E,YAAC,IAAD,CAAaT,QAASA,KAGxB,mBAAK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C,EACsCA,QAASS,EAD/C,EAC+CA,YAAaR,EAD5D,EAC4DA,OAAQE,EADpE,EACoEA,OAE5E,IAAKL,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMY,EAAe,YAAC,IAAD,CAAkBlB,GAAG,+BAA+BmB,eAAe,wFAClFC,EAAyBX,EAAS,KACtC,mBAAK7B,UAAU,6CAAf,EACE,YAAC,IAAD,CACEoB,GAAG,uCACHmB,eAAe,4IACfE,OAAQ,CAAEV,OAAQA,MAKxB,OACE,YAAC,IAAD,CAAQW,gBAAiBL,EAAa9B,KAAK,YAAYiB,QAAS/B,EAAKa,cAActB,EAASwC,eAA5F,EACE,YAAC,IAAD,IACA,YAAC,IAAD,CACEmB,UAAU,kBACVC,WAAYrD,KAAKsD,eACjBjB,QAASA,EACTQ,mBAAoBA,EACpBE,aAAcA,EACdI,gBAAiBL,EACjBS,QAASN,QAPX,EASGd,EAAWf,KAAI,SAAAS,GAAE,OAChB,YAAC,EAAD,CAAoCA,GAAIA,GAARA,S,GAzDfX,K,0BAER,CACjBsC,OAAQlC,IAAUE,OAAOH,WACzBS,SAAUR,IAAUC,KAAKF,WACzBwB,mBAAoBvB,IAAUC,KAC9Bc,QAASf,IAAUmC,KACnBtB,WAAYhB,IAAmBuC,KAC/BpB,OAAQhB,IAAUmC,KAClBjB,OAAQlB,IAAUqC,OAClBzD,KAAMoB,IAAUE,OAAOH,WACvByB,YAAaxB,IAAUmC,O","file":"features/follow_requests.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Permalink from '../../../components/permalink';\nimport Avatar from '../../../components/avatar';\nimport DisplayName from '../../../components/display_name';\nimport IconButton from '../../../components/icon_button';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\nconst messages = defineMessages({\n authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' },\n reject: { id: 'follow_request.reject', defaultMessage: 'Reject' },\n});\n\nexport default @injectIntl\nclass AccountAuthorize extends ImmutablePureComponent {\n\n static propTypes = {\n account: ImmutablePropTypes.map.isRequired,\n onAuthorize: PropTypes.func.isRequired,\n onReject: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n render () {\n const { intl, account, onAuthorize, onReject } = this.props;\n const content = { __html: account.get('note_emojified') };\n\n return (\n <div className='account-authorize__wrapper'>\n <div className='account-authorize'>\n <Permalink href={account.get('url')} to={`/accounts/${account.get('id')}`} className='detailed-status__display-name'>\n <div className='account-authorize__avatar'><Avatar account={account} size={48} /></div>\n <DisplayName account={account} />\n </Permalink>\n\n <div className='account__header__content' dangerouslySetInnerHTML={content} />\n </div>\n\n <div className='account--panel'>\n <div className='account--panel__button'><IconButton title={intl.formatMessage(messages.authorize)} icon='check' onClick={onAuthorize} /></div>\n <div className='account--panel__button'><IconButton title={intl.formatMessage(messages.reject)} icon='times' onClick={onReject} /></div>\n </div>\n </div>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport { makeGetAccount } from '../../../selectors';\nimport AccountAuthorize from '../components/account_authorize';\nimport { authorizeFollowRequest, rejectFollowRequest } from '../../../actions/accounts';\n\nconst makeMapStateToProps = () => {\n const getAccount = makeGetAccount();\n\n const mapStateToProps = (state, props) => ({\n account: getAccount(state, props.id),\n });\n\n return mapStateToProps;\n};\n\nconst mapDispatchToProps = (dispatch, { id }) => ({\n onAuthorize () {\n dispatch(authorizeFollowRequest(id));\n },\n\n onReject () {\n dispatch(rejectFollowRequest(id));\n },\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(AccountAuthorize);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { debounce } from 'lodash';\nimport LoadingIndicator from '../../components/loading_indicator';\nimport Column from '../ui/components/column';\nimport ColumnBackButtonSlim from '../../components/column_back_button_slim';\nimport AccountAuthorizeContainer from './containers/account_authorize_container';\nimport { fetchFollowRequests, expandFollowRequests } from '../../actions/accounts';\nimport ScrollableList from '../../components/scrollable_list';\nimport { me } from '../../initial_state';\n\nconst messages = defineMessages({\n heading: { id: 'column.follow_requests', defaultMessage: 'Follow requests' },\n});\n\nconst mapStateToProps = state => ({\n accountIds: state.getIn(['user_lists', 'follow_requests', 'items']),\n hasMore: !!state.getIn(['user_lists', 'follow_requests', 'next']),\n locked: !!state.getIn(['accounts', me, 'locked']),\n domain: state.getIn(['meta', 'domain']),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass FollowRequests extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n hasMore: PropTypes.bool,\n accountIds: ImmutablePropTypes.list,\n locked: PropTypes.bool,\n domain: PropTypes.string,\n intl: PropTypes.object.isRequired,\n multiColumn: PropTypes.bool,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchFollowRequests());\n }\n\n handleLoadMore = debounce(() => {\n this.props.dispatch(expandFollowRequests());\n }, 300, { leading: true });\n\n render () {\n const { intl, shouldUpdateScroll, accountIds, hasMore, multiColumn, locked, domain } = this.props;\n\n if (!accountIds) {\n return (\n <Column>\n <LoadingIndicator />\n </Column>\n );\n }\n\n const emptyMessage = <FormattedMessage id='empty_column.follow_requests' defaultMessage=\"You don't have any follow requests yet. When you receive one, it will show up here.\" />;\n const unlockedPrependMessage = locked ? null : (\n <div className='follow_requests-unlocked_explanation'>\n <FormattedMessage\n id='follow_requests.unlocked_explanation'\n defaultMessage='Even though your account is not locked, the {domain} staff thought you might want to review follow requests from these accounts manually.'\n values={{ domain: domain }}\n />\n </div>\n );\n\n return (\n <Column bindToDocument={!multiColumn} icon='user-plus' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n <ScrollableList\n scrollKey='follow_requests'\n onLoadMore={this.handleLoadMore}\n hasMore={hasMore}\n shouldUpdateScroll={shouldUpdateScroll}\n emptyMessage={emptyMessage}\n bindToDocument={!multiColumn}\n prepend={unlockedPrependMessage}\n >\n {accountIds.map(id =>\n <AccountAuthorizeContainer key={id} id={id} />,\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |