Pleroma/priv/static/packs/flavours/glitch/async/mutes.js.map

1 line
3.8 KiB
Plaintext
Raw Normal View History

2020-01-22 16:00:23 +01:00
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/mutes/index.js"],"names":["messages","defineMessages","heading","Mutes","connect","state","accountIds","getIn","hasMore","injectIntl","props","dispatch","expandMutes","leading","componentWillMount","this","fetchMutes","render","intl","emptyMessage","id","defaultMessage","name","icon","formatMessage","scrollKey","onLoadMore","handleLoadMore","map","ImmutablePureComponent","params","PropTypes","object","isRequired","func","bool","ImmutablePropTypes","list"],"mappings":"oTAcMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,kDAUHC,EAFUC,kBALQ,SAAAC,GAAK,MAAK,CAChCC,WAAYD,EAAME,MAAM,CAAC,aAAc,QAAS,UAChDC,UAAWH,EAAME,MAAM,CAAC,aAAc,QAAS,W,GAIhDE,a,mMAekB,IAAS,WACxB,EAAKC,MAAMC,SAASC,gBACnB,IAAK,CAAEC,SAAS,K,8CANnBC,mBAAA,WACEC,KAAKL,MAAMC,SAASK,gB,EAOtBC,OAAA,WAAW,IAAD,EAC8BF,KAAKL,MAAnCQ,EADA,EACAA,KAAMZ,EADN,EACMA,WAAYE,EADlB,EACkBA,QAE1B,IAAKF,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMa,EAAe,YAAC,IAAD,CAAkBC,GAAG,qBAAqBC,eAAe,qCAE9E,OACE,YAAC,IAAD,CAAQC,KAAK,QAAQC,KAAK,aAAarB,QAASgB,EAAKM,cAAcxB,EAASE,eAA5E,EACE,YAAC,IAAD,IACA,YAAC,IAAD,CACEuB,UAAU,QACVC,WAAYX,KAAKY,eACjBnB,QAASA,EACTW,aAAcA,QAJhB,EAMGb,EAAWsB,IAAI,SAAAR,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,GAARA,Q,GAzCfS,K,0BAEC,CACjBC,OAAQC,IAAUC,OAAOC,WACzBtB,SAAUoB,IAAUG,KAAKD,WACzBzB,QAASuB,IAAUI,KACnB7B,WAAY8B,IAAmBC,KAC/BnB,KAAMa,IAAUC,OAAOC,a","file":"flavours/glitch/async/mutes.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\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 AccountContainer from 'flavours/glitch/containers/account_container';\nimport { fetchMutes, expandMutes } from 'flavours/glitch/actions/mutes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\n\nconst messages = defineMessages({\n heading: { id: 'column.mutes', defaultMessage: 'Muted users' },\n});\n\nconst mapStateToProps = state => ({\n accountIds: state.getIn(['user_lists', 'mutes', 'items']),\n hasMore: !!state.getIn(['user_lists', 'mutes', 'next']),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Mutes 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 };\n\n componentWillMount () {\n this.props.dispatch(fetchMutes());\n }\n\n handleLoadMore = debounce(() => {\n this.props.dispatch(expandMutes());\n }, 300, { leading: true });\n\n render () {\n const { intl, 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.mutes' defaultMessage=\"You haven't muted any users yet.\" />;\n\n return (\n <Column name='mutes' icon='volume-off' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n <ScrollableList\n scrollKey='mutes'\n onLoadMore={this.handleLoadMore}\n hasMore={hasMore}\n emptyMessage={emptyMessage}\n >\n {accountIds.map(id =>\n <AccountContainer key={id} id={id} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}