akkoma/priv/static/packs/flavours/glitch/async/follow_requests.js.map
Haelwenn (lanodan) Monnier 2a850abbeb
MastoFE: Bundle 2020-01-20
2020-02-29 06:41:13 +01:00

1 line
8.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","expandFollowRequests","leading","componentWillMount","fetchFollowRequests","multiColumn","name","emptyMessage","defaultMessage","bindToDocument","scrollKey","onLoadMore","handleLoadMore","params","bool","list"],"mappings":"mSAUMA,EAAWC,YAAe,CAC9BC,UAAU,CAAD,0DACTC,OAAO,CAAD,sDAIFC,EADUC,a,sGAUdC,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,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AQQ,KAAK,wBAAb,EACE,YAAC,IAAD,KAKN,IAAMC,EAAe,YAAC,IAAD,CAAkBf,GAAG,+BAA+BgB,eAAe,wFAExF,OACE,YAAC,IAAD,CAAQC,gBAAiBJ,EAAaC,KAAK,kBAAkB3B,KAAK,YAAYiB,QAAS/B,EAAKa,cAActB,EAASwC,eAAnH,EACE,YAAC,IAAD,IAEA,YAAC,IAAD,CACEc,UAAU,kBACVC,WAAYhD,KAAKiD,eACjBZ,QAASA,EACTO,aAAcA,EACdE,gBAAiBJ,QALnB,EAOGP,EAAWf,KAAI,SAAAS,GAAE,OAChB,YAAC,EAAD,CAAoCA,GAAIA,GAARA,S,GA5CfX,K,0BAER,CACjBgC,OAAQ5B,IAAUE,OAAOH,WACzBS,SAAUR,IAAUC,KAAKF,WACzBgB,QAASf,IAAU6B,KACnBhB,WAAYhB,IAAmBiC,KAC/BlD,KAAMoB,IAAUE,OAAOH,WACvBqB,YAAapB,IAAU6B,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';\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 hasMore: PropTypes.bool,\n accountIds: ImmutablePropTypes.list,\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 } = 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\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 >\n {accountIds.map(id =>\n <AccountAuthorizeContainer key={id} id={id} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}