mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 10:07:24 +00:00
1 line
3.8 KiB
Plaintext
1 line
3.8 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/blocks/index.js"],"names":["messages","defineMessages","heading","Blocks","connect","state","accountIds","getIn","hasMore","injectIntl","props","dispatch","expandBlocks","leading","componentWillMount","this","fetchBlocks","render","intl","emptyMessage","id","defaultMessage","name","icon","formatMessage","scrollKey","onLoadMore","handleLoadMore","map","ImmutablePureComponent","params","PropTypes","object","isRequired","func","ImmutablePropTypes","list","bool"],"mappings":"oTAcMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,qDAUHC,EAFUC,kBALQ,SAAAC,GAAK,MAAK,CAChCC,WAAYD,EAAME,MAAM,CAAC,aAAc,SAAU,UACjDC,UAAWH,EAAME,MAAM,CAAC,aAAc,SAAU,W,GAIjDE,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,sBAAsBC,eAAe,uCAE/E,OACE,YAAC,IAAD,CAAQC,KAAK,SAASC,KAAK,MAAMrB,QAASgB,EAAKM,cAAcxB,EAASE,eAAtE,EACE,YAAC,IAAD,IACA,YAAC,IAAD,CACEuB,UAAU,SACVC,WAAYX,KAAKY,eACjBnB,QAASA,EACTW,aAAcA,QAJhB,EAMGb,EAAWsB,IAAI,SAAAR,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,GAARA,Q,GAzCdS,K,0BAEA,CACjBC,OAAQC,IAAUC,OAAOC,WACzBtB,SAAUoB,IAAUG,KAAKD,WACzB3B,WAAY6B,IAAmBC,KAC/B5B,QAASuB,IAAUM,KACnBnB,KAAMa,IAAUC,OAAOC,a","file":"flavours/glitch/async/blocks.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { debounce } from 'lodash';\nimport PropTypes from 'prop-types';\nimport LoadingIndicator from 'flavours/glitch/components/loading_indicator';\nimport ScrollableList from '../../components/scrollable_list';\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 { fetchBlocks, expandBlocks } from 'flavours/glitch/actions/blocks';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\nconst messages = defineMessages({\n heading: { id: 'column.blocks', defaultMessage: 'Blocked users' },\n});\n\nconst mapStateToProps = state => ({\n accountIds: state.getIn(['user_lists', 'blocks', 'items']),\n hasMore: !!state.getIn(['user_lists', 'blocks', 'next']),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Blocks extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n accountIds: ImmutablePropTypes.list,\n hasMore: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchBlocks());\n }\n\n handleLoadMore = debounce(() => {\n this.props.dispatch(expandBlocks());\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.blocks' defaultMessage=\"You haven't blocked any users yet.\" />;\n\n return (\n <Column name='blocks' icon='ban' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n <ScrollableList\n scrollKey='blocks'\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":""} |