pleroma/priv/static/packs/features/community_timeline.js.map
2020-01-22 16:00:23 +01:00

1 line
No EOL
8.9 KiB
Text

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/community_timeline/containers/column_settings_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/community_timeline/index.js"],"names":["connect","state","uuid","columnId","columns","getIn","index","findIndex","c","get","settings","dispatch","onChange","key","checked","changeColumnParams","changeSetting","ColumnSettings","messages","defineMessages","title","CommunityTimeline","onlyMedia","timelineState","hasUnread","size","injectIntl","props","removeColumn","addColumn","other","dir","moveColumn","column","scrollTop","maxId","expandCommunityTimeline","componentDidMount","this","disconnect","connectCommunityStream","componentDidUpdate","prevProps","componentWillUnmount","render","intl","shouldUpdateScroll","multiColumn","pinned","bindToDocument","ref","setRef","label","formatMessage","icon","active","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","trackScroll","scrollKey","timelineId","onLoadMore","handleLoadMore","emptyMessage","id","defaultMessage","React","PureComponent","router","PropTypes","object"],"mappings":"qPA2BeA,oBAtBS,SAACC,EAAD,GAA0B,IAC1CC,EADyC,EAAfC,SAE1BC,EAAUH,EAAMI,MAAM,CAAC,WAAY,YACnCC,EAAQF,EAAQG,UAAU,SAAAC,GAAC,OAAIA,EAAEC,IAAI,UAAYP,IAEvD,MAAO,CACLQ,SAAWR,GAAQI,GAAS,EAAKF,EAAQK,IAAIH,GAAOG,IAAI,UAAYR,EAAMI,MAAM,CAAC,WAAY,gBAItE,SAACM,EAAD,GAA6B,IAAhBR,EAAe,EAAfA,SACtC,MAAO,CACLS,SADK,SACKC,EAAKC,GAEXH,EADER,EACOY,YAAmBZ,EAAUU,EAAKC,GAElCE,YAAc,CAAC,aAAF,OAAkBH,GAAMC,OAMvCd,CAA6CiB,K,+CCf5D,IAAMC,EAAWC,YAAe,CAC9BC,MAAM,CAAD,yDAiBDC,EAFUrB,kBAZQ,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wC,EACxCA,SAAUW,EAD8B,EAC9BA,UAElBgB,KAAKC,aACL5B,EAASyB,YAAwB,CAAEd,eACnCgB,KAAKC,WAAa5B,EAAS6B,YAAuB,CAAElB,iB,EAIxDqB,qBAAA,WACML,KAAKC,aACPD,KAAKC,aACLD,KAAKC,WAAa,O,EActBK,OAAA,WAAW,IAAD,EAC0EN,KAAKX,MAA/EkB,EADA,EACAA,KAAMC,EADN,EACMA,mBAAoBtB,EAD1B,EAC0BA,UAAWrB,EADrC,EACqCA,SAAU4C,EAD/C,EAC+CA,YAAazB,EAD5D,EAC4DA,UAC9D0B,IAAW7C,EAEjB,OACE,kBAAC,IAAD,CAAQ8C,gBAAiBF,EAAaG,IAAKZ,KAAKa,OAAQC,MAAOP,EAAKQ,cAAcnC,EAASE,QACzF,YAAC,IAAD,CACEkC,KAAK,QACLC,OAAQ/B,EACRJ,MAAOyB,EAAKQ,cAAcnC,EAASE,OACnCoC,MAAOlB,KAAKmB,UACZC,OAAQpB,KAAKqB,WACbC,QAAStB,KAAKuB,kBACdb,OAAQA,EACRD,YAAaA,QARf,EAUE,YAAC,EAAD,CAAyB5C,SAAUA,KAGrC,YAAC,IAAD,CACE2D,aAAcd,EACde,UAAS,sBAAwB5D,EACjC6D,WAAU,aAAc1C,EAAY,SAAW,IAC/C2C,WAAY3B,KAAK4B,eACjBC,aAAc,YAAC,IAAD,CAAkBC,GAAG,yBAAyBC,eAAe,mFAC3EvB,mBAAoBA,EACpBG,gBAAiBF,M,GAnGKuB,IAAMC,e,6BAEd,CACpBC,OAAQC,IAAUC,S,6BAGE,CACpBpD,WAAW,I","file":"features/community_timeline.js","sourcesContent":["import { connect } from 'react-redux';\nimport ColumnSettings from '../components/column_settings';\nimport { changeSetting } from '../../../actions/settings';\nimport { changeColumnParams } from '../../../actions/columns';\n\nconst mapStateToProps = (state, { columnId }) => {\n const uuid = columnId;\n const columns = state.getIn(['settings', 'columns']);\n const index = columns.findIndex(c => c.get('uuid') === uuid);\n\n return {\n settings: (uuid && index >= 0) ? columns.get(index).get('params') : state.getIn(['settings', 'community']),\n };\n};\n\nconst mapDispatchToProps = (dispatch, { columnId }) => {\n return {\n onChange (key, checked) {\n if (columnId) {\n dispatch(changeColumnParams(columnId, key, checked));\n } else {\n dispatch(changeSetting(['community', ...key], checked));\n }\n },\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport StatusListContainer from '../ui/containers/status_list_container';\nimport Column from '../../components/column';\nimport ColumnHeader from '../../components/column_header';\nimport { expandCommunityTimeline } from '../../actions/timelines';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport ColumnSettingsContainer from './containers/column_settings_container';\nimport { connectCommunityStream } from '../../actions/streaming';\n\nconst messages = defineMessages({\n title: { id: 'column.community', defaultMessage: 'Local timeline' },\n});\n\nconst mapStateToProps = (state, { onlyMedia, columnId }) => {\n const uuid = columnId;\n const columns = state.getIn(['settings', 'columns']);\n const index = columns.findIndex(c => c.get('uuid') === uuid);\n const timelineState = state.getIn(['timelines', `community${onlyMedia ? ':media' : ''}`]);\n\n return {\n hasUnread: !!timelineState && (timelineState.get('unread') > 0 || timelineState.get('pendingItems').size > 0),\n onlyMedia: (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'community', 'other', 'onlyMedia']),\n };\n};\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass CommunityTimeline extends React.PureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static defaultProps = {\n onlyMedia: false,\n };\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n columnId: PropTypes.string,\n intl: PropTypes.object.isRequired,\n hasUnread: PropTypes.bool,\n multiColumn: PropTypes.bool,\n onlyMedia: PropTypes.bool,\n };\n\n handlePin = () => {\n const { columnId, dispatch, onlyMedia } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('COMMUNITY', { other: { onlyMedia } }));\n }\n }\n\n handleMove = (dir) => {\n const { columnId, dispatch } = this.props;\n dispatch(moveColumn(columnId, dir));\n }\n\n handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n componentDidMount () {\n const { dispatch, onlyMedia } = this.props;\n\n dispatch(expandCommunityTimeline({ onlyMedia }));\n this.disconnect = dispatch(connectCommunityStream({ onlyMedia }));\n }\n\n componentDidUpdate (prevProps) {\n if (prevProps.onlyMedia !== this.props.onlyMedia) {\n const { dispatch, onlyMedia } = this.props;\n\n this.disconnect();\n dispatch(expandCommunityTimeline({ onlyMedia }));\n this.disconnect = dispatch(connectCommunityStream({ onlyMedia }));\n }\n }\n\n componentWillUnmount () {\n if (this.disconnect) {\n this.disconnect();\n this.disconnect = null;\n }\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleLoadMore = maxId => {\n const { dispatch, onlyMedia } = this.props;\n\n dispatch(expandCommunityTimeline({ maxId, onlyMedia }));\n }\n\n render () {\n const { intl, shouldUpdateScroll, hasUnread, columnId, multiColumn, onlyMedia } = this.props;\n const pinned = !!columnId;\n\n return (\n <Column bindToDocument={!multiColumn} ref={this.setRef} label={intl.formatMessage(messages.title)}>\n <ColumnHeader\n icon='users'\n active={hasUnread}\n title={intl.formatMessage(messages.title)}\n onPin={this.handlePin}\n onMove={this.handleMove}\n onClick={this.handleHeaderClick}\n pinned={pinned}\n multiColumn={multiColumn}\n >\n <ColumnSettingsContainer columnId={columnId} />\n </ColumnHeader>\n\n <StatusListContainer\n trackScroll={!pinned}\n scrollKey={`community_timeline-${columnId}`}\n timelineId={`community${onlyMedia ? ':media' : ''}`}\n onLoadMore={this.handleLoadMore}\n emptyMessage={<FormattedMessage id='empty_column.community' defaultMessage='The local timeline is empty. Write something publicly to get the ball rolling!' />}\n shouldUpdateScroll={shouldUpdateScroll}\n bindToDocument={!multiColumn}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}