spc-pleroma/priv/static/packs/flavours/glitch/async/reblogs.js.map

1 line
5.3 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/reblogs/index.js"],"names":["messages","defineMessages","heading","refresh","Reblogs","connect","state","props","accountIds","getIn","params","statusId","injectIntl","column","scrollTop","c","dispatch","fetchReblogs","componentWillMount","this","componentWillReceiveProps","nextProps","render","intl","multiColumn","emptyMessage","id","defaultMessage","ref","setRef","icon","title","formatMessage","onClick","handleHeaderClick","showBackButton","extraButton","className","aria-label","handleRefresh","scrollKey","bindToDocument","map","withNote","ImmutablePureComponent","PropTypes","object","isRequired","func","ImmutablePropTypes","list","bool"],"mappings":"kUAcA,IAAMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,sDACPC,QAAQ,CAAD,yCASHC,EAFUC,mBAJQ,SAACC,EAAOC,GAAR,MAAmB,CACzCC,WAAYF,EAAMG,MAAM,CAAC,aAAc,eAAgBF,EAAMG,OAAOC,c,GAIrEC,a,kOAuBqB,WAClB,EAAKC,OAAOC,e,qCAGL,SAAAC,GACP,EAAKF,OAASE,K,4CAGA,WACd,EAAKR,MAAMS,SAASC,YAAa,EAAKV,MAAMG,OAAOC,c,6BArBrDO,mBAAA,WACOC,KAAKZ,MAAMC,YACdW,KAAKZ,MAAMS,SAASC,YAAaE,KAAKZ,MAAMG,OAAOC,Y,EAIvDS,0BAAA,SAA0BC,GACpBA,EAAUX,OAAOC,WAAaQ,KAAKZ,MAAMG,OAAOC,UAAYU,EAAUX,OAAOC,UAC/EQ,KAAKZ,MAAMS,SAASC,YAAaI,EAAUX,OAAOC,Y,EAgBtDW,OAAA,WAAW,IAAD,EACkCH,KAAKZ,MAAvCgB,EADA,EACAA,KAAMf,EADN,EACMA,WAAYgB,EADlB,EACkBA,YAE1B,IAAKhB,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMiB,EAAe,YAAC,IAAD,CAAkBC,GAAG,uBAAuBC,eAAe,iFAEhF,OACE,kBAAC,IAAD,CAAQC,IAAKT,KAAKU,QAChB,YAAC,IAAD,CACEC,KAAK,UACLC,MAAOR,EAAKS,cAAchC,EAASE,SACnC+B,QAASd,KAAKe,kBACdC,gBAAc,EACdX,YAAaA,EACbY,YACE,sBAAQC,UAAU,wBAAwBN,MAAOR,EAAKS,cAAchC,EAASG,SAAUmC,aAAYf,EAAKS,cAAchC,EAASG,SAAU8B,QAASd,KAAKoB,oBAAvJ,EAAsK,YAAC,IAAD,CAAMb,GAAG,eAInL,YAAC,IAAD,CACEc,UAAU,UACVf,aAAcA,EACdgB,gBAAiBjB,QAHnB,EAKGhB,EAAWkC,KAAI,SAAAhB,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,EAAIiB,UAAU,GAAtBjB,U,GAlEbkB,K,0BAED,CACjBlC,OAAQmC,IAAUC,OAAOC,WACzB/B,SAAU6B,IAAUG,KAAKD,WACzBvC,WAAYyC,IAAmBC,KAC/B1B,YAAaqB,IAAUM,KACvB5B,KAAMsB,IAAUC,OAAOC,a","file":"flavours/glitch/async/reblogs.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport LoadingIndicator from 'flavours/glitch/components/loading_indicator';\nimport { fetchReblogs } from 'flavours/glitch/actions/interactions';\nimport AccountContainer from 'flavours/glitch/containers/account_container';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport Icon from 'flavours/glitch/components/icon';\nimport ColumnHeader from 'flavours/glitch/components/column_header';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\n\nconst messages = defineMessages({\n heading: { id: 'column.reblogged_by', defaultMessage: 'Boosted by' },\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 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 handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleRefresh = () => {\n this.props.dispatch(fetchReblogs(this.props.params.statusId));\n }\n\n render () {\n const { intl, 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 ref={this.setRef}>\n <ColumnHeader\n icon='retweet'\n title={intl.formatMessage(messages.heading)}\n onClick={this.handleHeaderClick}\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 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":""}