1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-19 11:29:17 +00:00
akkoma/priv/static/packs/features/community_timeline.js.map

1 line
8.9 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/community_timeline/containers/column_settings_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/community_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","CommunityTimeline","onlyMedia","hasUnread","injectIntl","_this$props","_this","props","removeColumn","addColumn","other","dir","_this$props2","moveColumn","column","scrollTop","maxId","_this$props3","expandCommunityTimeline","componentDidMount","_this$props4","this","disconnect","connectCommunityStream","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","trackScroll","scrollKey","timelineId","onLoadMore","handleLoadMore","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,gBAItE,SAACM,EAADC,GAA4B,IAAfT,EAAeS,EAAfT,SACtC,MAAO,CACLU,SADK,SACKC,EAAKC,GAEXJ,EADER,EACOa,YAAmBb,EAAUW,EAAKC,GAElCE,YAAa,CAAE,aAAFC,OAAkBJ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,GAAIA,EAAUvB,YAAcmB,KAAKd,MAAML,UAAW,KAAAwB,EAChBL,KAAKd,MAA7BpB,EADwCuC,EACxCvC,SAAUe,EAD8BwB,EAC9BxB,UAElBmB,KAAKC,aACLnC,EAAS+B,YAAwB,CAAEhB,eACnCmB,KAAKC,WAAanC,EAASoC,YAAuB,CAAErB,mBAIxDyB,qBAAA,WACMN,KAAKC,aACPD,KAAKC,aACLD,KAAKC,WAAa,SActBM,OAAA,WAAU,IAAAC,EAC0ER,KAAKd,MAA/EuB,EADAD,EACAC,KAAMC,EADNF,EACME,mBAAoB5B,EAD1B0B,EAC0B1B,UAAWxB,EADrCkD,EACqClD,SAAUqD,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,aAAcrB,EACdsB,UAAS,sBAAwB5E,EACjC6E,WAAU,aAActD,EAAY,SAAW,IAC/CuD,WAAYpC,KAAKqC,eACjBC,aAAclB,OAAAC,EAAA,EAAAD,CAACmB,EAAA,EAAD,CAAkB7D,GAAG,yBAAyBC,eAAe,mFAC3E+B,mBAAoBA,SAlGE8B,IAAMC,4CAEd,CACpBC,OAAQC,IAAUC,sCAGE,CACpB/D,WAAW","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\n return {\n hasUnread: state.getIn(['timelines', `community${onlyMedia ? ':media' : ''}`, 'unread']) > 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 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 />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}