1 line
No EOL
8.5 KiB
Text
1 line
No EOL
8.5 KiB
Text
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/public_timeline/containers/column_settings_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/public_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","PublicTimeline","onlyMedia","hasUnread","injectIntl","props","removeColumn","addColumn","other","dir","moveColumn","column","scrollTop","maxId","expandPublicTimeline","componentDidMount","this","disconnect","connectPublicStream","componentDidUpdate","prevProps","componentWillUnmount","render","intl","multiColumn","pinned","ref","setRef","name","label","formatMessage","icon","active","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","timelineId","onLoadMore","handleLoadMore","trackScroll","scrollKey","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,aAItE,SAACM,EAAD,GAA6B,IAAhBR,EAAe,EAAfA,SACtC,MAAO,CACLS,SADK,SACKC,EAAKC,GAEXH,EADER,EACOY,YAAmBZ,EAAUU,EAAKC,GAElCE,YAAc,CAAC,UAAF,OAAeH,GAAMC,OAMpCd,CAA6CiB,K,+CCf5D,IAAMC,EAAWC,YAAe,CAC9BC,MAAM,CAAD,0DAgBDC,EAFUrB,kBAXQ,SAACC,EAAD,GAAqC,IAA3BqB,EAA0B,EAA1BA,UAAWnB,E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,iB,EAIrDmB,qBAAA,WACML,KAAKC,aACPD,KAAKC,aACLD,KAAKC,WAAa,O,EActBK,OAAA,WAAW,IAAD,EACsDN,KAAKX,MAA3DkB,EADA,EACAA,KAAMxC,EADN,EACMA,SAAUoB,EADhB,EACgBA,UAAWqB,EAD3B,EAC2BA,YAAatB,EADxC,EACwCA,UAC1CuB,IAAW1C,EAEjB,OACE,kBAAC,IAAD,CAAQ2C,IAAKV,KAAKW,OAAQC,KAAK,YAAYC,MAAON,EAAKO,cAAchC,EAASE,QAC5E,YAAC,IAAD,CACE+B,KAAK,QACLC,OAAQ7B,EACRH,MAAOuB,EAAKO,cAAchC,EAASE,OACnCiC,MAAOjB,KAAKkB,UACZC,OAAQnB,KAAKoB,WACbC,QAASrB,KAAKsB,kBACdb,OAAQA,EACRD,YAAaA,QARf,EAUE,YAAC,EAAD,CAAyBzC,SAAUA,KAGrC,YAAC,IAAD,CACEwD,WAAU,UAAWrC,EAAY,SAAW,IAC5CsC,WAAYxB,KAAKyB,eACjBC,aAAcjB,EACdkB,UAAS,mBAAqB5D,EAC9B6D,aAAc,YAAC,IAAD,CAAkBC,GAAG,sBAAsBC,eAAe,mH,GAhGrDC,IAAMC,e,6BAEX,CACpB9C,WAAW,I,6BAGS,CACpB+C,OAAQC,IAAUC,S","file":"flavours/glitch/async/public_timeline.js","sourcesContent":["import { connect } from 'react-redux';\nimport ColumnSettings from 'flavours/glitch/features/community_timeline/components/column_settings';\nimport { changeSetting } from 'flavours/glitch/actions/settings';\nimport { changeColumnParams } from 'flavours/glitch/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', 'public']),\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(['public', ...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 'flavours/glitch/features/ui/containers/status_list_container';\nimport Column from 'flavours/glitch/components/column';\nimport ColumnHeader from 'flavours/glitch/components/column_header';\nimport { expandPublicTimeline } from 'flavours/glitch/actions/timelines';\nimport { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns';\nimport ColumnSettingsContainer from './containers/column_settings_container';\nimport { connectPublicStream } from 'flavours/glitch/actions/streaming';\n\nconst messages = defineMessages({\n title: { id: 'column.public', defaultMessage: 'Federated 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\n return {\n hasUnread: state.getIn(['timelines', `public${onlyMedia ? ':media' : ''}`, 'unread']) > 0,\n onlyMedia: (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'public', 'other', 'onlyMedia']),\n };\n};\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass PublicTimeline extends React.PureComponent {\n\n static defaultProps = {\n onlyMedia: false,\n };\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n columnId: PropTypes.string,\n multiColumn: PropTypes.bool,\n hasUnread: 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('PUBLIC', { 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(expandPublicTimeline({ onlyMedia }));\n this.disconnect = dispatch(connectPublicStream({ 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(expandPublicTimeline({ onlyMedia }));\n this.disconnect = dispatch(connectPublicStream({ 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(expandPublicTimeline({ maxId, onlyMedia }));\n }\n\n render () {\n const { intl, columnId, hasUnread, multiColumn, onlyMedia } = this.props;\n const pinned = !!columnId;\n\n return (\n <Column ref={this.setRef} name='federated' label={intl.formatMessage(messages.title)}>\n <ColumnHeader\n icon='globe'\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 timelineId={`public${onlyMedia ? ':media' : ''}`}\n onLoadMore={this.handleLoadMore}\n trackScroll={!pinned}\n scrollKey={`public_timeline-${columnId}`}\n emptyMessage={<FormattedMessage id='empty_column.public' defaultMessage='There is nothing here! Write something publicly, or manually follow users from other servers to fill it up' />}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |