pleroma/priv/static/packs/features/mutes.js.map

1 line
4.1 KiB
Plaintext
Raw Normal View History

2020-05-20 05:55:14 +00:00
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/mutes/index.js"],"names":["messages","defineMessages","heading","Mutes","connect","state","accountIds","getIn","hasMore","injectIntl","props","dispatch","expandMutes","leading","componentWillMount","this","fetchMutes","render","intl","shouldUpdateScroll","multiColumn","emptyMessage","id","defaultMessage","bindToDocument","icon","formatMessage","scrollKey","onLoadMore","handleLoadMore","map","ImmutablePureComponent","params","PropTypes","object","isRequired","func","bool","ImmutablePropTypes","list"],"mappings":"oUAcA,IAAMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,kDAUHC,EAFUC,mBALQ,SAAAC,GAAK,MAAK,CAChCC,WAAYD,EAAME,MAAM,CAAC,aAAc,QAAS,UAChDC,UAAWH,EAAME,MAAM,CAAC,aAAc,QAAS,Y,GAIhDE,a,8NAiBkB,KAAS,WACxB,EAAKC,MAAMC,SAASC,iBACnB,IAAK,CAAEC,SAAS,K,6BANnBC,mBAAA,WACEC,KAAKL,MAAMC,SAASK,gB,EAOtBC,OAAA,WAAW,IAAD,EAC+DF,KAAKL,MAApEQ,EADA,EACAA,KAAMC,EADN,EACMA,mBAAoBX,EAD1B,EAC0BA,QAASF,EADnC,EACmCA,WAAYc,EAD/C,EAC+CA,YAEvD,IAAKd,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMe,EAAe,YAAC,IAAD,CAAkBC,GAAG,qBAAqBC,eAAe,qCAE9E,OACE,YAAC,IAAD,CAAQC,gBAAiBJ,EAAaK,KAAK,aAAavB,QAASgB,EAAKQ,cAAc1B,EAASE,eAA7F,EACE,YAAC,IAAD,IACA,YAAC,IAAD,CACEyB,UAAU,QACVC,WAAYb,KAAKc,eACjBrB,QAASA,EACTW,mBAAoBA,EACpBE,aAAcA,EACdG,gBAAiBJ,QANnB,EAQGd,EAAWwB,KAAI,SAAAR,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,GAARA,U,GA7CfS,K,0BAEC,CACjBC,OAAQC,IAAUC,OAAOC,WACzBxB,SAAUsB,IAAUG,KAAKD,WACzBhB,mBAAoBc,IAAUG,KAC9B5B,QAASyB,IAAUI,KACnB/B,WAAYgC,IAAmBC,KAC/BrB,KAAMe,IAAUC,OAAOC,WACvBf,YAAaa,IAAUI,O","file":"features/mutes.js","sourcesContent":["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 AccountContainer from '../../containers/account_container';\nimport { fetchMutes, expandMutes } from '../../actions/mutes';\nimport ScrollableList from '../../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 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(fetchMutes());\n }\n\n handleLoadMore = debounce(() => {\n this.props.dispatch(expandMutes());\n }, 300, { leading: true });\n\n render () {\n const { intl, shouldUpdateScroll, hasMore, accountIds, 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.mutes' defaultMessage=\"You haven't muted any users yet.\" />;\n\n return (\n <Column bindToDocument={!multiColumn} icon='volume-off' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n <ScrollableList\n scrollKey='mutes'\n onLoadMore={this.handleLoadMore}\n hasMore={hasMore}\n shouldUpdateScroll={shouldUpdateScroll}\n emptyMessage={emptyMessage}\n bindToDocument={!multiColumn}\n >\n {accountIds.map(id =>\n <AccountCont