mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-27 03:04:12 +00:00
1 line
4.4 KiB
Plaintext
1 line
4.4 KiB
Plaintext
{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/blocks/index.js"],"names":["messages","Object","react_intl__WEBPACK_IMPORTED_MODULE_7__","heading","id","defaultMessage","Blocks","react_redux__WEBPACK_IMPORTED_MODULE_6__","state","accountIds","getIn","handleLoadMore","lodash_debounce__WEBPACK_IMPORTED_MODULE_4___default","_this","props","dispatch","_actions_blocks__WEBPACK_IMPORTED_MODULE_15__","leading","componentWillMount","this","render","_props","intl","shouldUpdateScroll","babel_runtime_helpers_jsx__WEBPACK_IMPORTED_MODULE_0___default","_ui_components_column__WEBPACK_IMPORTED_MODULE_12__","_components_loading_indicator__WEBPACK_IMPORTED_MODULE_11__","emptyMessage","icon","formatMessage","_components_column_back_button_slim__WEBPACK_IMPORTED_MODULE_13__","_components_scrollable_list__WEBPACK_IMPORTED_MODULE_16__","scrollKey","onLoadMore","map","_containers_account_container__WEBPACK_IMPORTED_MODULE_14__","react_immutable_pure_component__WEBPACK_IMPORTED_MODULE_8__","propTypes","params","prop_types__WEBPACK_IMPORTED_MODULE_10___default","a","object","isRequired","func","react_immutable_proptypes__WEBPACK_IMPORTED_MODULE_9___default","list"],"mappings":"uVAcMA,EAAWC,OAAAC,EAAA,EAAAD,EACfE,SAAAC,GAAA,gBAAAC,eAAA,mBASmBC,EAFpBL,OAAAM,EAAA,QAAAN,CAJuB,SAAAO,GAAA,OACtBC,WAAYD,EAAME,OAAO,aAAc,SAAU,eAIlDT,OAAAC,EAAA,EAAAD,iLAeCU,eAAiBC,IAAS,WACxBC,EAAKC,MAAMC,SAASd,OAAAe,EAAA,EAAAf,KACnB,KAAOgB,SAAS,6CANnBC,8BACEC,KAAKL,MAAMC,SAASd,OAAAe,EAAA,EAAAf,iBAOtBmB,kBAAU,IAAAC,EACyCF,KAAKL,MAA9CQ,EADAD,EACAC,KAAMb,EADNY,EACMZ,WAAYc,EADlBF,EACkBE,mBAE1B,IAAKd,EACH,OAAAe,IACGC,EAAA,UADH,EAAAD,IAEKE,EAAA,OAKP,IAAMC,EAAAH,IAAgBtB,EAAA,GAAhBE,GAAoC,sBAApCC,eAAyE,uCAE/E,OAAAmB,IACGC,EAAA,GADHG,KACe,MADfzB,QAC8BmB,EAAKO,cAAc7B,EAASG,eAD1D,EAAAqB,IAEKM,EAAA,MAFLN,IAGKO,EAAA,GAHLC,UAIgB,SAJhBC,WAKkBd,KAAKR,eALvBY,mBAM0BA,EAN1BI,aAOoBA,QAPpB,EASOlB,EAAWyB,IAAI,SAAA9B,GAAA,OAAAoB,IACbW,EAAA,GADa/B,GACiBA,GAARA,WAzCCgC,EAAA,KAE3BC,WACLC,OAAQC,EAAAC,EAAUC,OAAOC,WACzB3B,SAAUwB,EAAAC,EAAUG,KAAKD,WACzBnB,mBAAoBgB,EAAAC,EAAUG,KAC9BlC,WAAYmC,EAAAJ,EAAmBK,KAC/BvB,KAAMiB,EAAAC,EAAUC,OAAOC","file":"features/blocks.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 ImmutablePropTypes from 'react-immutable-proptypes';\nimport { debounce } from 'lodash';\nimport PropTypes from 'prop-types';\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 { fetchBlocks, expandBlocks } from '../../actions/blocks';\nimport ScrollableList from '../../components/scrollable_list';\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});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class Blocks extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n accountIds: ImmutablePropTypes.list,\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, shouldUpdateScroll } = 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 icon='ban' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n <ScrollableList\n scrollKey='blocks'\n onLoadMore={this.handleLoadMore}\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":""} |