pleroma/priv/static/packs/flavours/glitch/async/follow_requests.js.map

1 line
No EOL
9.2 KiB
Text

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/follow_requests/components/account_authorize.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/follow_requests/containers/account_authorize_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/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","e","_e$target","target","scrollTop","scrollHeight","clientHeight","_this","expandFollowRequests","prevRouterProps","location","mastodonModalOpen","componentWillMount","fetchFollowRequests","column","name","column_back_button_slim","react_router_scroll_4_es","scrollKey","shouldUpdateScroll","onScroll","handleScroll","account_authorize_container","loading_indicator","params","list"],"mappings":"6RAUMA,EAAWC,YAAe,CAC9BC,UAAS,CAAAC,GAAA,2BAAAC,eAAA,aACTC,OAAM,CAAAF,GAAA,wBAAAC,eAAA,YAIaE,EADpBC,mHAUCC,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,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AK,MAAK,CAChCO,WAAYP,EAAMQ,MAAM,CAAC,aAAc,kBAAmB,eAI3D7C,8MAcgB,SAAC8C,GAAM,IAAAC,EAC8BD,EAAEE,OADhCD,EACZE,YADYF,EACDG,aADCH,EACaI,cAG/BC,EAAKhD,MAAMkC,SAASe,iEAIH,SAACC,EAADf,GAAmC,IAAfgB,EAAehB,EAAfgB,SACvC,UAAOD,GAAmB,IAAIC,UAAY,IAAIlB,OAAS,IAAImB,qBAClDD,EAASlB,OAASkB,EAASlB,MAAMmB,mEAd5CC,mBAAA,WACEtD,KAAKC,MAAMkC,SAASoB,kBAgBtBzD,OAAA,WAAU,IAAAC,EACqBC,KAAKC,MAA1BC,EADAH,EACAG,KAAMuC,EADN1C,EACM0C,WAEd,OAAKA,EASHhC,OAAAC,EAAA,EAAAD,CAAC+C,EAAA,EAAD,CAAQC,KAAK,kBAAkBnC,KAAK,QAAQiB,QAASrC,EAAKmB,cAAc/B,EAASiD,eAAjF,EACE9B,OAAAC,EAAA,EAAAD,CAACiD,EAAA,EAAD,IAEAjD,OAAAC,EAAA,EAAAD,CAACkD,EAAA,EAAD,CAAiBC,UAAU,kBAAkBC,mBAAoB7D,KAAK6D,yBAAtE,EACEpD,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,aAAamD,SAAU9D,KAAK+D,mBAA3C,EACGtB,EAAWf,IAAI,SAAAjC,GAAE,OAChBgB,OAAAC,EAAA,EAAAD,CAACuD,EAAD,CAAoCvE,GAAIA,GAARA,QAbtCgB,OAAAC,EAAA,EAAAD,CAAC+C,EAAA,EAAD,CAAQC,KAAK,wBAAb,EACEhD,OAAAC,EAAA,EAAAD,CAACwD,EAAA,EAAD,SAhCkCzC,+BAEvB,CACjB0C,OAAQtC,IAAUE,OAAOH,WACzBQ,SAAUP,IAAUC,KAAKF,WACzBc,WAAYhB,IAAmB0C,KAC/BjE,KAAM0B,IAAUE,OAAOH","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\n@injectIntl\nexport default class 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 LoadingIndicator from 'flavours/glitch/components/loading_indicator';\nimport { ScrollContainer } from 'react-router-scroll-4';\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 } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\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});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class FollowRequests extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n accountIds: ImmutablePropTypes.list,\n intl: PropTypes.object.isRequired,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchFollowRequests());\n }\n\n handleScroll = (e) => {\n const { scrollTop, scrollHeight, clientHeight } = e.target;\n\n if (scrollTop === scrollHeight - clientHeight) {\n this.props.dispatch(expandFollowRequests());\n }\n }\n\n shouldUpdateScroll = (prevRouterProps, { location }) => {\n if ((((prevRouterProps || {}).location || {}).state || {}).mastodonModalOpen) return false;\n return !(location.state && location.state.mastodonModalOpen);\n }\n\n render () {\n const { intl, accountIds } = this.props;\n\n if (!accountIds) {\n return (\n <Column name='follow-requests'>\n <LoadingIndicator />\n </Column>\n );\n }\n\n return (\n <Column name='follow-requests' icon='users' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n\n <ScrollContainer scrollKey='follow_requests' shouldUpdateScroll={this.shouldUpdateScroll}>\n <div className='scrollable' onScroll={this.handleScroll}>\n {accountIds.map(id =>\n <AccountAuthorizeContainer key={id} id={id} />\n )}\n </div>\n </ScrollContainer>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}