honkoma/priv/static/packs/features/home_timeline.js.map

1 line
9.3 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/home_timeline/components/column_settings.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/home_timeline/index.js"],"names":["ColumnSettings","injectIntl","render","this","props","settings","onChange","className","id","defaultMessage","prefix","settingPath","label","React","PureComponent","connect","state","getIn","dispatch","key","checked","changeSetting","onSave","saveSettings","messages","defineMessages","title","HomeTimeline","hasUnread","isPartial","columnId","removeColumn","addColumn","dir","moveColumn","column","scrollTop","c","maxId","expandHomeTimeline","componentDidMount","_checkIfReloadNeeded","componentDidUpdate","prevProps","componentWillUnmount","_stopPolling","wasPartial","polling","setInterval","clearInterval","intl","shouldUpdateScroll","multiColumn","pinned","bindToDocument","ref","setRef","formatMessage","icon","active","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","trackScroll","scrollKey","onLoadMore","handleLoadMore","timelineId","emptyMessage","values","public","Link","to"],"mappings":"2NAOMA,EADUC,Y,oGASdC,OAAA,WAAW,IAAD,EACuBC,KAAKC,MAA5BC,EADA,EACAA,SAAUC,EADV,EACUA,SAElB,OACE,4BACE,oBAAMC,UAAU,iCAAhB,EAA2C,YAAC,IAAD,CAAkBC,GAAG,6BAA6BC,eAAe,WAE5G,mBAAKF,UAAU,6BAAf,EACE,YAAC,IAAD,CAAeG,OAAO,gBAAgBL,SAAUA,EAAUM,YAAa,CAAC,QAAS,UAAWL,SAAUA,EAAUM,MAAO,YAAC,IAAD,CAAkBJ,GAAG,oCAAoCC,eAAe,mBAGjM,mBAAKF,UAAU,6BAAf,EACE,YAAC,IAAD,CAAeG,OAAO,gBAAgBL,SAAUA,EAAUM,YAAa,CAAC,QAAS,SAAUL,SAAUA,E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1B,KAAK0C,iB,EAITA,aAAA,WACM1C,KAAK4C,UACPE,cAAc9C,KAAK4C,SACnB5C,KAAK4C,QAAU,O,EAInB7C,OAAA,WAAW,IAAD,EAC+DC,KAAKC,MAApE8C,EADA,EACAA,KAAMC,EADN,EACMA,mBAAoBvB,EAD1B,EAC0BA,UAAWE,EADrC,EACqCA,SAAUsB,EAD/C,EAC+CA,YACjDC,IAAWvB,EAEjB,OACE,kBAAC,IAAD,CAAQwB,gBAAiBF,EAAaG,IAAKpD,KAAKqD,OAAQ5C,MAAOsC,EAAKO,cAAcjC,EAASE,QACzF,YAAC,IAAD,CACEgC,KAAK,OACLC,OAAQ/B,EACRF,MAAOwB,EAAKO,cAAcjC,EAASE,OACnCkC,MAAOzD,KAAK0D,UACZC,OAAQ3D,KAAK4D,WACbC,QAAS7D,KAAK8D,kBACdZ,OAAQA,EACRD,YAAaA,QARf,EAUE,YAAC,EAAD,KAGF,YAAC,IAAD,CACEc,aAAcb,EACdc,UAAS,iBAAmBrC,EAC5BsC,WAAYjE,KAAKkE,eACjBC,WAAW,OACXC,aAAc,YAAC,IAAD,CAAkB/D,GAAG,oBAAoBC,eAAe,iGAAiG+D,OAAQ,CAAEC,OAAQ,YAACC,EAAA,EAAD,CAAMC,GAAG,0BAAT,EAA6B,YAAC,IAAD,CAAkBnE,GAAG,oCAAoCC,eAAe,4BAC9R0C,mBAAoBA,EACpBG,gBAAiBF,M,GAlGAvC,IAAMC,iB","file":"features/home_timeline.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport SettingToggle from '../../notifications/components/setting_toggle';\n\nexport default @injectIntl\nclass ColumnSettings extends React.PureComponent {\n\n static propTypes = {\n settings: ImmutablePropTypes.map.isRequired,\n onChange: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n render () {\n const { settings, onChange } = this.props;\n\n return (\n <div>\n <span className='column-settings__section'><FormattedMessage id='home.column_settings.basic' defaultMessage='Basic' /></span>\n\n <div className='column-settings__row'>\n <SettingToggle prefix='home_timeline' settings={settings} settingPath={['shows', 'reblog']} onChange={onChange} label={<FormattedMessage id='home.column_settings.show_reblogs' defaultMessage='Show boosts' />} />\n </div>\n\n <div className='column-settings__row'>\n <SettingToggle prefix='home_timeline' settings={settings} settingPath={['shows', 'reply']} onChange={onChange} label={<FormattedMessage id='home.column_settings.show_replies' defaultMessage='Show replies' />} />\n </div>\n </div>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport ColumnSettings from '../components/column_settings';\nimport { changeSetting, saveSettings } from '../../../actions/settings';\n\nconst mapStateToProps = state => ({\n settings: state.getIn(['settings', 'home']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n onChange (key, checked) {\n dispatch(changeSetting(['home', ...key], checked));\n },\n\n onSave () {\n dispatch(saveSettings());\n },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { expandHomeTimeline } from '../../actions/timelines';\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 { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ColumnSettingsContainer from './containers/column_settings_container';\nimport { Link } from 'react-router-dom';\n\nconst messages = defineMessages({\n title: { id: 'column.home', defaultMessage: 'Home' },\n});\n\nconst mapStateToProps = state => ({\n hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0,\n isPartial: state.getIn(['timelines', 'home', 'isPartial']),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass HomeTimeline extends React.PureComponent {\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n intl: PropTypes.object.isRequired,\n hasUnread: PropTypes.bool,\n isPartial: PropTypes.bool,\n columnId: PropTypes.string,\n multiColumn: PropTypes.bool,\n };\n\n handlePin = () => {\n const { columnId, dispatch } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('HOME', {}));\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 setRef = c => {\n this.column = c;\n }\n\n handleLoadMore = maxId => {\n this.props.dispatch(expandHomeTimeline({ maxId }));\n }\n\n componentDidMount () {\n this._checkIfReloadNeeded(false, this.props.isPartial);\n }\n\n componentDidUpdate (prevProps) {\n this._checkIfReloadNeeded(prevProps.isPartial, this.props.isPartial);\n }\n\n componentWillUnmount () {\n this._stopPolling();\n }\n\n _checkIfReloadNeeded (wasPartial, isPartial) {\n const { dispatch } = this.props;\n\n if (wasPartial === isPartial) {\n return;\n } else if (!wasPartial && isPartial) {\n this.polling = setInterval(() => {\n dispatch(expandHomeTimeline());\n }, 3000);\n } else if (wasPartial && !isPartial) {\n this._stopPolling();\n }\n }\n\n _stopPolling () {\n if (this.polling) {\n clearInterval(this.polling);\n this.polling = null;\n }\n }\n\n render () {\n const { intl, shouldUpdateScroll, hasUnread, columnId, multiColumn } = 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='home'\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 />\n </ColumnHeader>\n\n <StatusListContainer\n trackScroll={!pinned}\n scrollKey={`home_timeline-${columnId}`}\n onLoadMore={this.handleLoadMore}\n timelineId='home'\n emptyMessage={<FormattedMessage id='empty_column.home' defaultMessage='Your home timeline is empty! Visit {public} or use search to get started and meet other users.' values={{ public: <Link to='/timelines/public'><FormattedMessage id='empty_column.home.public_timeline' defaultMessage='the public timeline' /></Link> }} />}\n shouldUpdateScroll={shouldUpdateScroll}\n bindToDocument={!multiColumn}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}