mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-19 16:10:59 +00:00
1 line
No EOL
4.1 KiB
Text
1 line
No EOL
4.1 KiB
Text
{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/favourites/index.js"],"names":["Favourites","Object","react_redux__WEBPACK_IMPORTED_MODULE_5__","state","props","accountIds","getIn","params","statusId","componentWillMount","this","dispatch","_actions_interactions__WEBPACK_IMPORTED_MODULE_10__","componentWillReceiveProps","nextProps","render","_props","shouldUpdateScroll","babel_runtime_helpers_jsx__WEBPACK_IMPORTED_MODULE_0___default","_ui_components_column__WEBPACK_IMPORTED_MODULE_13__","_components_loading_indicator__WEBPACK_IMPORTED_MODULE_9__","emptyMessage","react_intl__WEBPACK_IMPORTED_MODULE_11__","id","defaultMessage","_components_column_back_button__WEBPACK_IMPORTED_MODULE_14__","_components_scrollable_list__WEBPACK_IMPORTED_MODULE_15__","scrollKey","map","_containers_account_container__WEBPACK_IMPORTED_MODULE_12__","withNote","react_immutable_pure_component__WEBPACK_IMPORTED_MODULE_6__","propTypes","prop_types__WEBPACK_IMPORTED_MODULE_7___default","a","object","isRequired","func","react_immutable_proptypes__WEBPACK_IMPORTED_MODULE_8___default","list"],"mappings":"sUAkBqBA,EADpBC,OAAAC,EAAA,QAAAD,CAJuB,SAACE,EAAOC,GAAR,OACtBC,WAAYF,EAAMG,OAAO,aAAc,gBAAiBF,EAAMG,OAAOC,6HAarEC,8BACEC,KAAKN,MAAMO,SAASV,OAAAW,EAAA,EAAAX,CAAgBS,KAAKN,MAAMG,OAAOC,wBAGxDK,mCAA2BC,GACrBA,EAAUP,OAAOC,WAAaE,KAAKN,MAAMG,OAAOC,UAAYM,EAAUP,OAAOC,UAC/EE,KAAKN,MAAMO,SAASV,OAAAW,EAAA,EAAAX,CAAgBa,EAAUP,OAAOC,wBAIzDO,kBAAU,IAAAC,EACmCN,KAAKN,MAAxCa,EADAD,EACAC,mBAAoBZ,EADpBW,EACoBX,WAE5B,IAAKA,EACH,OAAAa,IACGC,EAAA,UADH,EAAAD,IAEKE,EAAA,OAKP,IAAMC,EAAAH,IAAgBI,EAAA,GAAhBC,GAAoC,0BAApCC,eAA6E,oFAEnF,OAAAN,IACGC,EAAA,UADH,EAAAD,IAEKO,EAAA,MAFLP,IAIKQ,EAAA,GAJLC,UAKgB,aALhBV,mBAM0BA,EAN1BI,aAOoBA,QAPpB,EASOhB,EAAWuB,IAAI,SAAAL,GAAA,OAAAL,IACbW,EAAA,GADaN,GACiBA,EADjBO,UAC+B,GAAtBP,WA1CKQ,EAAA,KAE/BC,WACLzB,OAAQ0B,EAAAC,EAAUC,OAAOC,WACzBzB,SAAUsB,EAAAC,EAAUG,KAAKD,WACzBnB,mBAAoBgB,EAAAC,EAAUG,KAC9BhC,WAAYiC,EAAAJ,EAAmBK","file":"features/favourites.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport LoadingIndicator from '../../components/loading_indicator';\nimport { fetchFavourites } from '../../actions/interactions';\nimport { FormattedMessage } from 'react-intl';\nimport AccountContainer from '../../containers/account_container';\nimport Column from '../ui/components/column';\nimport ColumnBackButton from '../../components/column_back_button';\nimport ScrollableList from '../../components/scrollable_list';\n\nconst mapStateToProps = (state, props) => ({\n accountIds: state.getIn(['user_lists', 'favourited_by', props.params.statusId]),\n});\n\n@connect(mapStateToProps)\nexport default class Favourites 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 };\n\n componentWillMount () {\n this.props.dispatch(fetchFavourites(this.props.params.statusId));\n }\n\n componentWillReceiveProps (nextProps) {\n if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {\n this.props.dispatch(fetchFavourites(nextProps.params.statusId));\n }\n }\n\n render () {\n const { shouldUpdateScroll, 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.favourites' defaultMessage='No one has favourited this toot yet. When someone does, they will show up here.' />;\n\n return (\n <Column>\n <ColumnBackButton />\n\n <ScrollableList\n scrollKey='favourites'\n shouldUpdateScroll={shouldUpdateScroll}\n emptyMessage={emptyMessage}\n >\n {accountIds.map(id =>\n <AccountContainer key={id} id={id} withNote={false} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |