pleroma/priv/static/packs/features/follow_requests.js.map

1 line
No EOL
9.1 KiB
Text

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/follow_requests/components/account_authorize.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/follow_requests/index.js"],"names":["messages","defineMessages","authorize","id","defaultMessage","reject","AccountAuthorize","injectIntl","render","_this$props","this","props","intl","account","onAuthorize","onReject","content","__html","get","Object","jsx","className","permalink","href","to","avatar","size","display_name","dangerouslySetInnerHTML","icon_button","title","formatMessage","icon","onClick","ImmutablePureComponent","ImmutablePropTypes","map","isRequired","PropTypes","func","object","connect","getAccount","makeGetAccount","state","dispatch","_ref","authorizeFollowRequest","rejectFollowRequest","heading","FollowRequests","accountIds","getIn","hasMore","debounce_default","_this","expandFollowRequests","leading","componentWillMount","fetchFollowRequests","shouldUpdateScroll","column","loading_indicator","emptyMessage","index_es","column_back_button_slim","scrollable_list","scrollKey","onLoadMore","handleLoadMore","account_authorize_container","params","bool","list"],"mappings":"qSAUMA,EAAWC,YAAe,CAC9BC,UAAS,CAAAC,GAAA,2BAAAC,eAAA,aACTC,OAAM,CAAAF,GAAA,wBAAAC,eAAA,YAIFE,EADUC,mHAUdC,OAAA,WAAU,IAAAC,EACyCC,KAAKC,MAA9CC,EADAH,EACAG,KAAMC,EADNJ,EACMI,QAASC,EADfL,EACeK,YAAaC,EAD5BN,EAC4BM,SAC9BC,EAAU,CAAEC,OAAQJ,EAAQK,IAAI,mBAEtC,OACEC,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,mCAAf,EACEF,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,0BAAf,EACEF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAWC,KAAMV,EAAQK,IAAI,OAAQM,GAAE,aAAeX,EAAQK,IAAI,MAASG,UAAU,sCA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BAAmB,UAC1DC,UAAWT,EAAMQ,MAAM,CAAC,aAAc,kBAAmB,cAI1D7C,gNAgBkB+C,IAAS,WACxBC,EAAK5C,MAAMkC,SAASW,gBACnB,IAAK,CAAEC,SAAS,mDANnBC,mBAAA,WACEhD,KAAKC,MAAMkC,SAASc,kBAOtBnD,OAAA,WAAU,IAAAC,EACkDC,KAAKC,MAAvDC,EADAH,EACAG,KAAMgD,EADNnD,EACMmD,mBAAoBT,EAD1B1C,EAC0B0C,WAAYE,EADtC5C,EACsC4C,QAE9C,IAAKF,EACH,OACEhC,OAAAC,EAAA,EAAAD,CAAC0C,EAAA,EAAD,UACE1C,OAAAC,EAAA,EAAAD,CAAC2C,EAAA,EAAD,KAKN,IAAMC,EAAe5C,OAAAC,EAAA,EAAAD,CAAC6C,EAAA,EAAD,CAAkB7D,GAAG,+BAA+BC,eAAe,wFAExF,OACEe,OAAAC,EAAA,EAAAD,CAAC0C,EAAA,EAAD,CAAQ7B,KAAK,QAAQiB,QAASrC,EAAKmB,cAAc/B,EAASiD,eAA1D,EACE9B,OAAAC,EAAA,EAAAD,CAAC8C,EAAA,EAAD,IACA9C,OAAAC,EAAA,EAAAD,CAAC+C,EAAA,EAAD,CACEC,UAAU,kBACVC,WAAY1D,KAAK2D,eACjBhB,QAASA,EACTO,mBAAoBA,EACpBG,aAAcA,QALhB,EAOGZ,EAAWf,IAAI,SAAAjC,GAAE,OAChBgB,OAAAC,EAAA,EAAAD,CAACmD,EAAD,CAAoCnE,GAAIA,GAARA,WA3Cf+B,+BAER,CACjBqC,OAAQjC,IAAUE,OAAOH,WACzBQ,SAAUP,IAAUC,KAAKF,WACzBuB,mBAAoBtB,IAAUC,KAC9Bc,QAASf,IAAUkC,KACnBrB,WAAYhB,IAAmBsC,KAC/B7D,KAAM0B,IAAUE,OAAOH","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';\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});\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 intl: PropTypes.object.isRequired,\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 } = 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\n return (\n <Column icon='users' 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 >\n {accountIds.map(id =>\n <AccountAuthorizeContainer key={id} id={id} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}