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

1 line
No EOL
4.5 KiB
Text

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/mutes/index.js"],"names":["messages","defineMessages","heading","id","defaultMessage","Mutes","connect","state","accountIds","getIn","hasMore","injectIntl","lodash_debounce__WEBPACK_IMPORTED_MODULE_4___default","_this","props","dispatch","expandMutes","leading","componentWillMount","this","fetchMutes","render","_this$props","intl","shouldUpdateScroll","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","_ui_components_column__WEBPACK_IMPORTED_MODULE_12__","_components_loading_indicator__WEBPACK_IMPORTED_MODULE_11__","emptyMessage","react_intl__WEBPACK_IMPORTED_MODULE_7__","icon","formatMessage","_components_column_back_button_slim__WEBPACK_IMPORTED_MODULE_13__","_components_scrollable_list__WEBPACK_IMPORTED_MODULE_16__","scrollKey","onLoadMore","handleLoadMore","map","_containers_account_container__WEBPACK_IMPORTED_MODULE_14__","ImmutablePureComponent","params","PropTypes","object","isRequired","func","bool","ImmutablePropTypes","list"],"mappings":"oTAcMA,EAAWC,YAAe,CAC9BC,QAAO,CAAAC,GAAA,eAAAC,eAAA,iBAUHC,EAFUC,kBALQ,SAAAC,GAAK,MAAK,CAChCC,WAAYD,EAAME,MAAM,CAAC,aAAc,QAAS,UAChDC,UAAWH,EAAME,MAAM,CAAC,aAAc,QAAS,cAIhDE,gNAgBkBC,IAAS,WACxBC,EAAKC,MAAMC,SAASC,gBACnB,IAAK,CAAEC,SAAS,mDANnBC,mBAAA,WACEC,KAAKL,MAAMC,SAASK,kBAOtBC,OAAA,WAAU,IAAAC,EACkDH,KAAKL,MAAvDS,EADAD,EACAC,KAAMC,EADNF,EACME,mBAAoBd,EAD1BY,EAC0BZ,QAASF,EADnCc,EACmCd,WAE3C,IAAKA,EACH,OACEiB,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,UACEF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,KAKN,IAAMC,EAAeJ,OAAAC,EAAA,EAAAD,CAACK,EAAA,EAAD,CAAkB3B,GAAG,qBAAqBC,eAAe,qCAE9E,OACEqB,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,CAAQI,KAAK,aAAa7B,QAASqB,EAAKS,cAAchC,EAASE,eAA/D,EACEuB,OAAAC,EAAA,EAAAD,CAACQ,EAAA,EAAD,IACAR,OAAAC,EAAA,EAAAD,CAACS,EAAA,EAAD,CACEC,UAAU,QACVC,WAAYjB,KAAKkB,eACjB3B,QAASA,EACTc,mBAAoBA,EACpBK,aAAcA,QALhB,EAOGrB,EAAW8B,IAAI,SAAAnC,GAAE,OAChBsB,OAAAC,EAAA,EAAAD,CAACc,EAAA,EAAD,CAA2BpC,GAAIA,GAARA,WA3CfqC,+BAEC,CACjBC,OAAQC,IAAUC,OAAOC,WACzB7B,SAAU2B,IAAUG,KAAKD,WACzBpB,mBAAoBkB,IAAUG,KAC9BnC,QAASgC,IAAUI,KACnBtC,WAAYuC,IAAmBC,KAC/BzB,KAAMmB,IAAUC,OAAOC","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 };\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 } = 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 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 >\n {accountIds.map(id =>\n <AccountContainer key={id} id={id} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}