mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-15 20:01:36 +00:00
1 line
9.2 KiB
Plaintext
1 line
9.2 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/public_timeline/containers/column_settings_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/public_timeline/index.js"],"names":["connect","state","_ref","uuid","columnId","columns","getIn","index","findIndex","c","get","settings","dispatch","_ref2","onChange","key","checked","changeColumnParams","changeSetting","concat","ColumnSettings","messages","defineMessages","title","id","defaultMessage","PublicTimeline","onlyMedia","hasUnread","injectIntl","_this$props","_this","props","removeColumn","addColumn","other","dir","_this$props2","moveColumn","column","scrollTop","maxId","_this$props3","expandPublicTimeline","prevRouterProps","location","mastodonModalOpen","componentDidMount","_this$props4","this","disconnect","connectPublicStream","componentDidUpdate","prevProps","_this$props5","componentWillUnmount","render","_this$props6","intl","multiColumn","pinned","react_default","a","createElement","ref","setRef","name","label","formatMessage","Object","jsx","column_header","icon","active","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","column_settings_container","status_list_container","timelineId","onLoadMore","handleLoadMore","trackScroll","scrollKey","emptyMessage","index_es","React","PureComponent","router","PropTypes","object"],"mappings":"oPA2BeA,oBAtBS,SAACC,EAADC,GAAyB,IACzCC,EADyCD,EAAfE,SAE1BC,EAAUJ,EAAMK,MAAM,CAAC,WAAY,YACnCC,EAAQF,EAAQG,UAAU,SAAAC,GAAC,OAAIA,EAAEC,IAAI,UAAYP,IAEvD,MAAO,CACLQ,SAAWR,GAAiB,GAATI,EAAcF,EAAQK,IAAIH,GAAOG,IAAI,UAAYT,EAAMK,MAAM,CAAC,WAAY,aAItE,SAACM,EAADC,GAA4B,IAAfT,EAAeS,EAAfT,SACtC,MAAO,CACLU,SADK,SACKC,EAAKC,GAEXJ,EADER,EACOa,YAAmBb,EAAUW,EAAKC,GAElCE,YAAa,CAAE,UAAFC,OAAeJ,G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GS,CACpBgE,OAAQC,IAAUC","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\n@connect(mapStateToProps)\n@injectIntl\nexport default class 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 shouldUpdateScroll = (prevRouterProps, { location }) => {\n return !(location.state && location.state.mastodonModalOpen)\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":""} |