summaryrefslogtreecommitdiff
path: root/priv/static/packs/features/follow_requests.js.map
blob: dd58baf4d34142cdc8c35227126b2a2baf693e56 (plain)
1
{"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","expandFollowRequests","leading","componentWillMount","fetchFollowRequests","shouldUpdateScroll","multiColumn","emptyMessage","defaultMessage","bindToDocument","scrollKey","onLoadMore","handleLoadMore","params","bool","list"],"mappings":"qSAUMA,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,MAC3E,YAAC,IAAD,CAAaT,QAASA,KAGxB,mB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N,IAAMS,EAAe,YAAC,IAAD,CAAkBf,GAAG,+BAA+BgB,eAAe,wFAExF,OACE,YAAC,IAAD,CAAQC,gBAAiBH,EAAa3B,KAAK,YAAYiB,QAAS/B,EAAKa,cAActB,EAASwC,eAA5F,EACE,YAAC,IAAD,IACA,YAAC,IAAD,CACEc,UAAU,kBACVC,WAAYhD,KAAKiD,eACjBZ,QAASA,EACTK,mBAAoBA,EACpBE,aAAcA,EACdE,gBAAiBH,QANnB,EAQGR,EAAWf,KAAI,SAAAS,GAAE,OAChB,YAAC,EAAD,CAAoCA,GAAIA,GAARA,S,GA7CfX,K,0BAER,CACjBgC,OAAQ5B,IAAUE,OAAOH,WACzBS,SAAUR,IAAUC,KAAKF,WACzBqB,mBAAoBpB,IAAUC,KAC9Bc,QAASf,IAAU6B,KACnBhB,WAAYhB,IAAmBiC,KAC/BlD,KAAMoB,IAAUE,OAAOH,WACvBsB,YAAarB,IAAU6B,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';\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    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 } = 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 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        >\n          {accountIds.map(id =>\n            <AccountAuthorizeContainer key={id} id={id} />\n          )}\n        </ScrollableList>\n      </Column>\n    );\n  }\n\n}\n"],"sourceRoot":""}