mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-02 17:55:13 +00:00
1 line
8.9 KiB
Plaintext
1 line
8.9 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/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","componentDidMount","_this$props4","this","disconnect","connectPublicStream","componentDidUpdate","prevProps","_this$props5","componentWillUnmount","render","_this$props6","intl","shouldUpdateScroll","multiColumn","pinned","react_default","a","createElement","ref","setRef","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,GAAMC,OAMpChB,CAA6C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,KAAKd,MAAML,UAAW,KAAAwB,EAChBL,KAAKd,MAA7BpB,EADwCuC,EACxCvC,SAAUe,EAD8BwB,EAC9BxB,UAElBmB,KAAKC,aACLnC,EAAS+B,YAAqB,CAAEhB,eAChCmB,KAAKC,WAAanC,EAASoC,YAAoB,CAAErB,mBAIrDyB,qBAAA,WACMN,KAAKC,aACPD,KAAKC,aACLD,KAAKC,WAAa,SActBM,OAAA,WAAU,IAAAC,EAC0ER,KAAKd,MAA/EuB,EADAD,EACAC,KAAMC,EADNF,EACME,mBAAoBpD,EAD1BkD,EAC0BlD,SAAUwB,EADpC0B,EACoC1B,UAAW6B,EAD/CH,EAC+CG,YAAa9B,EAD5D2B,EAC4D3B,UAC9D+B,IAAWtD,EAEjB,OACEuD,EAAAC,EAAAC,cAACtB,EAAA,EAAD,CAAQuB,IAAKhB,KAAKiB,OAAQC,MAAOT,EAAKU,cAAc5C,EAASE,QAC3D2C,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,CACEC,KAAK,QACLC,OAAQ1C,EACRL,MAAOgC,EAAKU,cAAc5C,EAASE,OACnCgD,MAAOzB,KAAK0B,UACZC,OAAQ3B,KAAK4B,WACbC,QAAS7B,KAAK8B,kBACdlB,OAAQA,EACRD,YAAaA,QARf,EAUES,OAAAC,EAAA,EAAAD,CAACW,EAAD,CAAyBzE,SAAUA,KAGrC8D,OAAAC,EAAA,EAAAD,CAACY,EAAA,EAAD,CACEC,WAAU,UAAWpD,EAAY,SAAW,IAC5CqD,WAAYlC,KAAKmC,eACjBC,aAAcxB,EACdyB,UAAS,mBAAqB/E,EAC9BgF,aAAclB,OAAAC,EAAA,EAAAD,CAACmB,EAAA,EAAD,CAAkB7D,GAAG,sBAAsBC,eAAe,+GACxE+B,mBAAoBA,SAlGD8B,IAAMC,4CAEX,CACpBC,OAAQC,IAAUC,sCAGE,CACpB/D,WAAW","file":"features/public_timeline.js","sourcesContent":["import { connect } from 'react-redux';\nimport ColumnSettings from '../../community_timeline/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', '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 '../ui/containers/status_list_container';\nimport Column from '../../components/column';\nimport ColumnHeader from '../../components/column_header';\nimport { expandPublicTimeline } from '../../actions/timelines';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport ColumnSettingsContainer from './containers/column_settings_container';\nimport { connectPublicStream } from '../../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 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 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, shouldUpdateScroll, columnId, hasUnread, multiColumn, onlyMedia } = this.props;\n const pinned = !!columnId;\n\n return (\n <Column ref={this.setRef} 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 shouldUpdateScroll={shouldUpdateScroll}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |