mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-14 22:30:44 +00:00
1 line
8.8 KiB
Plaintext
1 line
8.8 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/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","timelineState","hasUnread","injectIntl","props","removeColumn","addColumn","other","dir","moveColumn","column","scrollTop","maxId","expandPublicTimeline","componentDidMount","this","disconnect","connectPublicStream","componentDidUpdate","prevProps","componentWillUnmount","render","intl","shouldUpdateScroll","multiColumn","pinned","bindToDocument","ref","setRef","label","formatMessage","icon","active","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","timelineId","onLoadMore","handleLoadMore","trackScroll","scrollKey","emptyMessage","id","defaultMessage","React","PureComponent","router","PropTypes","object"],"mappings":"0SA2BeA,qBAtBS,SAACC,EAAD,GAA0B,IAC1CC,EADyC,EAAfC,SAE1BC,EAAUH,EAAMI,MAAM,CAAC,WAAY,YACnCC,EAAQF,EAAQG,WAAU,SAAAC,GAAC,OAAIA,EAAEC,IAAI,UAAYP,KAEvD,MAAO,CACLQ,SAAWR,GAAQI,GAAS,EAAKF,EAAQK,IAAIH,GAAOG,IAAI,UAAYR,EAAMI,MAAM,CAAC,WAAY,eAItE,SAACM,EAAD,GAA6B,IAAhBR,EAAe,EAAfA,SACtC,MAAO,CACLS,SADK,SACKC,EAAKC,GAEXH,EADER,EACOY,YAAmBZ,EAAUU,EAAKC,GAElCE,YAAc,CAAC,UAAF,OAAeH,GAAMC,QAMpCd,CAA6CiB,K,SCf5D,IAAMC,EAAWC,YAAe,CAC9BC,MAAM,CAAD,0DAkBD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Be,KAAKC,aACL3B,EAASwB,YAAqB,CAAEb,eAChCe,KAAKC,WAAa3B,EAAS4B,YAAoB,CAAEjB,iB,EAIrDoB,qBAAA,WACML,KAAKC,aACPD,KAAKC,aACLD,KAAKC,WAAa,O,EActBK,OAAA,WAAW,IAAD,EAC0EN,KAAKX,MAA/EkB,EADA,EACAA,KAAMC,EADN,EACMA,mBAAoB1C,EAD1B,EAC0BA,SAAUqB,EADpC,EACoCA,UAAWsB,EAD/C,EAC+CA,YAAaxB,EAD5D,EAC4DA,UAC9DyB,IAAW5C,EAEjB,OACE,kBAAC,IAAD,CAAQ6C,gBAAiBF,EAAaG,IAAKZ,KAAKa,OAAQC,MAAOP,EAAKQ,cAAclC,EAASE,QACzF,YAAC,IAAD,CACEiC,KAAK,QACLC,OAAQ9B,EACRJ,MAAOwB,EAAKQ,cAAclC,EAASE,OACnCmC,MAAOlB,KAAKmB,UACZC,OAAQpB,KAAKqB,WACbC,QAAStB,KAAKuB,kBACdb,OAAQA,EACRD,YAAaA,QARf,EAUE,YAAC,EAAD,CAAyB3C,SAAUA,KAGrC,YAAC,IAAD,CACE0D,WAAU,UAAWvC,EAAY,SAAW,IAC5CwC,WAAYzB,KAAK0B,eACjBC,aAAcjB,EACdkB,UAAS,mBAAqB9D,EAC9B+D,aAAc,YAAC,IAAD,CAAkBC,GAAG,sBAAsBC,eAAe,+GACxEvB,mBAAoBA,EACpBG,gBAAiBF,M,GAnGEuB,IAAMC,e,6BAEX,CACpBC,OAAQC,IAAUC,S,6BAGE,CACpBnD,WAAW,I","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, { columnId }) => {\n const uuid = columnId;\n const columns = state.getIn(['settings', 'columns']);\n const index = columns.findIndex(c => c.get('uuid') === uuid);\n const onlyMedia = (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'public', 'other', 'onlyMedia']);\n const timelineState = state.getIn(['timelines', `public${onlyMedia ? ':media' : ''}`]);\n\n return {\n hasUnread: !!timelineState && timelineState.get('unread') > 0,\n 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 bindToDocument={!multiColumn} 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 bindToDocument={!multiColumn}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |