mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-20 08:28:26 +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/mastodon/features/favourites/index.js"],"names":["Favourites","connect","state","props","accountIds","getIn","params","statusId","componentWillMount","this","dispatch","fetchFavourites","componentWillReceiveProps","nextProps","render","shouldUpdateScroll","multiColumn","emptyMessage","id","defaultMessage","scrollKey","bindToDocument","map","withNote","ImmutablePureComponent","PropTypes","object","isRequired","func","ImmutablePropTypes","list","bool"],"mappings":"2RAkBMA,EADUC,kBAJQ,SAACC,EAAOC,GAAR,MAAmB,CACzCC,WAAYF,EAAMG,MAAM,CAAC,aAAc,gBAAiBF,EAAMG,OAAOC,a,gHAcrEC,mBAAA,WACOC,KAAKN,MAAMC,YACdK,KAAKN,MAAMO,SAASC,YAAgBF,KAAKN,MAAMG,OAAOC,Y,EAI1DK,0BAAA,SAA2BC,GACrBA,EAAUP,OAAOC,WAAaE,KAAKN,MAAMG,OAAOC,UAAYM,EAAUP,OAAOC,UAC/EE,KAAKN,MAAMO,SAASC,YAAgBE,EAAUP,OAAOC,Y,EAIzDO,OAAA,WAAW,IAAD,EACgDL,KAAKN,MAArDY,EADA,EACAA,mBAAoBX,EADpB,EACoBA,WAAYY,EADhC,EACgCA,YAExC,IAAKZ,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMa,EAAe,YAAC,IAAD,CAAkBC,GAAG,0BAA0BC,eAAe,oFAEnF,OACE,YAAC,IAAD,UACE,YAAC,IAAD,CAAkBH,YAAaA,IAE/B,YAAC,IAAD,CACEI,UAAU,aACVL,mBAAoBA,EACpBE,aAAcA,EACdI,gBAAiBL,QAJnB,EAMGZ,EAAWkB,IAAI,SAAAJ,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,EAAIK,UAAU,GAAtBL,Q,GA9CVM,K,0BAEJ,CACjBlB,OAAQmB,IAAUC,OAAOC,WACzBjB,SAAUe,IAAUG,KAAKD,WACzBZ,mBAAoBU,IAAUG,KAC9BxB,WAAYyB,IAAmBC,KAC/Bd,YAAaS,IAAUM,O","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\nexport default @connect(mapStateToProps)\nclass 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 multiColumn: PropTypes.bool,\n };\n\n componentWillMount () {\n if (!this.props.accountIds) {\n this.props.dispatch(fetchFavourites(this.props.params.statusId));\n }\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, 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.favourites' defaultMessage='No one has favourited this toot yet. When someone does, they will show up here.' />;\n\n return (\n <Column>\n <ColumnBackButton multiColumn={multiColumn} />\n\n <ScrollableList\n scrollKey='favourites'\n shouldUpdateScroll={shouldUpdateScroll}\n emptyMessage={emptyMessage}\n bindToDocument={!multiColumn}\n >\n {accountIds.map(id =>\n <AccountContainer key={id} id={id} withNote={false} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |