mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-26 10:46:13 +00:00
1 line
4.1 KiB
Plaintext
1 line
4.1 KiB
Plaintext
{"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","multiColumn","emptyMessage","id","defaultMessage","bindToDocument","name","icon","formatMessage","scrollKey","onLoadMore","handleLoadMore","map","ImmutablePureComponent","params","PropTypes","object","isRequired","func","bool","ImmutablePropTypes","list"],"mappings":"mUAcA,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,8NAgBkB,KAAS,WACxB,EAAKC,MAAMC,SAASC,iBACnB,IAAK,CAAEC,SAAS,K,6BANnBC,mBAAA,WACEC,KAAKL,MAAMC,SAASK,gB,EAOtBC,OAAA,WAAW,IAAD,EAC2CF,KAAKL,MAAhDQ,EADA,EACAA,KAAMZ,EADN,EACMA,WAAYE,EADlB,EACkBA,QAASW,EAD3B,EAC2BA,YAEnC,IAAKb,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMc,EAAe,YAAC,IAAD,CAAkBC,GAAG,qBAAqBC,eAAe,qCAE9E,OACE,YAAC,IAAD,CAAQC,gBAAiBJ,EAAaK,KAAK,QAAQC,KAAK,aAAavB,QAASgB,EAAKQ,cAAc1B,EAASE,eAA1G,EACE,YAAC,IAAD,IACA,YAAC,IAAD,CACEyB,UAAU,QACVC,WAAYb,KAAKc,eACjBrB,QAASA,EACTY,aAAcA,EACdG,gBAAiBJ,QALnB,EAOGb,EAAWwB,KAAI,SAAAT,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,GAARA,U,GA3CfU,K,0BAEC,CACjBC,OAAQC,IAAUC,OAAOC,WACzBxB,SAAUsB,IAAUG,KAAKD,WACzB3B,QAASyB,IAAUI,KACnB/B,WAAYgC,IAAmBC,KAC/BrB,KAAMe,IAAUC,OAAOC,WACvBhB,YAAac,IAAUI,O","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 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, 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.mutes' defaultMessage=\"You haven't muted any users yet.\" />;\n\n return (\n <Column bindToDocument={!multiColumn} 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 bindToDocument={!multiColumn}\n >\n {accountIds.map(id =>\n <AccountContainer key={id} id={id} />,\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |