mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-30 09:02:28 +00:00
1 line
4.8 KiB
Plaintext
1 line
4.8 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/reblogs/index.js"],"names":["messages","defineMessages","refresh","Reblogs","connect","state","props","accountIds","getIn","params","statusId","injectIntl","dispatch","fetchReblogs","componentWillMount","this","componentWillReceiveProps","nextProps","render","intl","shouldUpdateScroll","multiColumn","emptyMessage","id","defaultMessage","bindToDocument","showBackButton","extraButton","className","title","formatMessage","aria-label","onClick","handleRefresh","scrollKey","map","withNote","ImmutablePureComponent","PropTypes","object","isRequired","func","ImmutablePropTypes","list","bool"],"mappings":"8SAcMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,yCASHC,EAFUC,mBAJQ,SAACC,EAAOC,GAAR,MAAmB,CACzCC,WAAYF,EAAMG,MAAM,CAAC,aAAc,eAAgBF,EAAMG,OAAOC,c,GAIrEC,a,mMAwBiB,WACd,EAAKL,MAAMM,SAASC,YAAa,EAAKP,MAAMG,OAAOC,c,8CAbrDI,mBAAA,WACOC,KAAKT,MAAMC,YACdQ,KAAKT,MAAMM,SAASC,YAAaE,KAAKT,MAAMG,OAAOC,Y,EAIvDM,0BAAA,SAA0BC,GACpBA,EAAUR,OAAOC,WAAaK,KAAKT,MAAMG,OAAOC,UAAYO,EAAUR,OAAOC,UAC/EK,KAAKT,MAAMM,SAASC,YAAaI,EAAUR,OAAOC,Y,EAQtDQ,OAAA,WAAW,IAAD,EACsDH,KAAKT,MAA3Da,EADA,EACAA,KAAMC,EADN,EACMA,mBAAoBb,EAD1B,EAC0BA,WAAYc,EADtC,EACsCA,YAE9C,IAAKd,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMe,EAAe,YAAC,IAAD,CAAkBC,GAAG,uBAAuBC,eAAe,iFAEhF,OACE,YAAC,IAAD,CAAQC,gBAAiBJ,QAAzB,EACE,YAAC,IAAD,CACEK,gBAAc,EACdL,YAAaA,EACbM,YACE,sBAAQC,UAAU,wBAAwBC,MAAOV,EAAKW,cAAc9B,EAASE,SAAU6B,aAAYZ,EAAKW,cAAc9B,EAASE,SAAU8B,QAASjB,KAAKkB,oBAAvJ,EAAsK,YAAC,IAAD,CAAMV,GAAG,eAInL,YAAC,IAAD,CACEW,UAAU,UACVd,mBAAoBA,EACpBE,aAAcA,EACdG,gBAAiBJ,QAJnB,EAMGd,EAAW4B,KAAI,SAAAZ,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,EAAIa,UAAU,GAAtBb,S,GAzDbc,K,0BAED,CACjB5B,OAAQ6B,IAAUC,OAAOC,WACzB5B,SAAU0B,IAAUG,KAAKD,WACzBpB,mBAAoBkB,IAAUG,KAC9BlC,WAAYmC,IAAmBC,KAC/BtB,YAAaiB,IAAUM,KACvBzB,KAAMmB,IAAUC,OAAOC,a","file":"features/reblogs.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 { fetchReblogs } from '../../actions/interactions';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport AccountContainer from '../../containers/account_container';\nimport Column from '../ui/components/column';\nimport ScrollableList from '../../components/scrollable_list';\nimport Icon from 'mastodon/components/icon';\nimport ColumnHeader from '../../components/column_header';\n\nconst messages = defineMessages({\n refresh: { id: 'refresh', defaultMessage: 'Refresh' },\n});\n\nconst mapStateToProps = (state, props) => ({\n accountIds: state.getIn(['user_lists', 'reblogged_by', props.params.statusId]),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Reblogs 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 intl: PropTypes.object.isRequired,\n };\n\n componentWillMount () {\n if (!this.props.accountIds) {\n this.props.dispatch(fetchReblogs(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(fetchReblogs(nextProps.params.statusId));\n }\n }\n\n handleRefresh = () => {\n this.props.dispatch(fetchReblogs(this.props.params.statusId));\n }\n\n render () {\n const { intl, 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='status.reblogs.empty' defaultMessage='No one has boosted this toot yet. When someone does, they will show up here.' />;\n\n return (\n <Column bindToDocument={!multiColumn}>\n <ColumnHeader\n showBackButton\n multiColumn={multiColumn}\n extraButton={(\n <button className='column-header__button' title={intl.formatMessage(messages.refresh)} aria-label={intl.formatMessage(messages.refresh)} onClick={this.handleRefresh}><Icon id='refresh' /></button>\n )}\n />\n\n <ScrollableList\n scrollKey='reblogs'\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":""} |