logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

favourites.js.map (5425B)


  1. {"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/favourites/index.js"],"names":["messages","defineMessages","heading","refresh","Favourites","connect","state","props","accountIds","getIn","params","statusId","injectIntl","column","scrollTop","c","dispatch","fetchFavourites","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,0DACPC,QAAQ,CAAD,yCASHC,EAFUC,mBAJQ,SAACC,EAAOC,GAAR,MAAmB,CACzCC,WAAYF,EAAMG,MAAM,CAAC,aAAc,gBAAiBF,EAAMG,OAAOC,c,GAItEC,a,kOAuBqB,WAClB,EAAKC,OAAOC,e,qCAGL,SAAAC,GACP,EAAKF,OAASE,K,4CAGA,WACd,EAAKR,MAAMS,SAASC,YAAgB,EAAKV,MAAMG,OAAOC,c,6BArBxDO,mBAAA,WACOC,KAAKZ,MAAMC,YACdW,KAAKZ,MAAMS,SAASC,YAAgBE,KAAKZ,MAAMG,OAAOC,Y,EAI1DS,0BAAA,SAA2BC,GACrBA,EAAUX,OAAOC,WAAaQ,KAAKZ,MAAMG,OAAOC,UAAYU,EAAUX,OAAOC,UAC/EQ,KAAKZ,MAAMS,SAASC,YAAgBI,EAAUX,OAAOC,Y,EAgBzDW,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,0BAA0BC,eAAe,oFAEnF,OACE,kBAAC,IAAD,CAAQC,IAAKT,KAAKU,QAChB,YAAC,IAAD,CACEC,KAAK,OACLC,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,eAGnL,YAAC,IAAD,CACEc,UAAU,aACVf,aAAcA,EACdgB,gBAAiBjB,QAHnB,EAKGhB,EAAWkC,KAAI,SAAAhB,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,EAAIiB,UAAU,GAAtBjB,U,GAjEVkB,K,0BAEJ,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/favourites.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 { fetchFavourites } 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 '../../components/scrollable_list';\n\nconst messages = defineMessages({\n heading: { id: 'column.favourited_by', defaultMessage: 'Favourited by' },\n refresh: { id: 'refresh', defaultMessage: 'Refresh' },\n});\n\nconst mapStateToProps = (state, props) => ({\n accountIds: state.getIn(['user_lists', 'favourited_by', props.params.statusId]),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Favourites 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(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 handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleRefresh = () => {\n this.props.dispatch(fetchFavourites(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='empty_column.favourites' defaultMessage='No one has favourited this toot yet. When someone does, they will show up here.' />;\n\n return (\n <Column ref={this.setRef}>\n <ColumnHeader\n icon='star'\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 <ScrollableList\n scrollKey='favourites'\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":""}