akkoma/priv/static/packs/flavours/glitch/async/follow_requests.js.map
2020-05-20 07:55:14 +02:00

1 line
9.7 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/follow_requests/containers/account_authorize_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/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","multiColumn","name","emptyMessage","defaultMessage","unlockedPrependMessage","values","bindToDocument","scrollKey","onLoadMore","handleLoadMore","prepend","params","bool","list","string"],"mappings":"iVAUA,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,YAA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WAAYE,EADlB,EACkBA,QAASQ,EAD3B,EAC2BA,YAAaP,EADxC,EACwCA,OAAQE,EADhD,EACgDA,OAExD,IAAKL,EACH,OACE,YAAC,IAAD,CAAQW,KAAK,wBAAb,EACE,YAAC,IAAD,KAKN,IAAMC,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,gBAAiBN,EAAaC,KAAK,kBAAkB9B,KAAK,YAAYiB,QAAS/B,EAAKa,cAActB,EAASwC,eAAnH,EACE,YAAC,IAAD,IAEA,YAAC,IAAD,CACEmB,UAAU,kBACVC,WAAYrD,KAAKsD,eACjBjB,QAASA,EACTU,aAAcA,EACdI,gBAAiBN,EACjBU,QAASN,QANX,EAQGd,EAAWf,KAAI,SAAAS,GAAE,OAChB,YAAC,EAAD,CAAoCA,GAAIA,GAARA,S,GAxDfX,K,0BAER,CACjBsC,OAAQlC,IAAUE,OAAOH,WACzBS,SAAUR,IAAUC,KAAKF,WACzBgB,QAASf,IAAUmC,KACnBtB,WAAYhB,IAAmBuC,KAC/BpB,OAAQhB,IAAUmC,KAClBjB,OAAQlB,IAAUqC,OAClBzD,KAAMoB,IAAUE,OAAOH,WACvBwB,YAAavB,IAAUmC,O","file":"flavours/glitch/async/follow_requests.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Permalink from 'flavours/glitch/components/permalink';\nimport Avatar from 'flavours/glitch/components/avatar';\nimport DisplayName from 'flavours/glitch/components/display_name';\nimport IconButton from 'flavours/glitch/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 'flavours/glitch/selectors';\nimport AccountAuthorize from '../components/account_authorize';\nimport { authorizeFollowRequest, rejectFollowRequest } from 'flavours/glitch/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 PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { debounce } from 'lodash';\nimport LoadingIndicator from 'flavours/glitch/components/loading_indicator';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim';\nimport AccountAuthorizeContainer from './containers/account_authorize_container';\nimport { fetchFollowRequests, expandFollowRequests } from 'flavours/glitch/actions/accounts';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\nimport { me } from 'flavours/glitch/util/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 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, accountIds, hasMore, multiColumn, locked, domain } = this.props;\n\n if (!accountIds) {\n return (\n <Column name='follow-requests'>\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} name='follow-requests' icon='user-plus' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n\n <ScrollableList\n scrollKey='follow_requests'\n onLoadMore={this.handleLoadMore}\n hasMore={hasMore}\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":""}