mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
1 line
No EOL
9.7 KiB
Text
1 line
No EOL
9.7 KiB
Text
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/home_timeline/components/column_settings.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/home_timeline/index.js"],"names":["ColumnSettings","injectIntl","render","_this$props","this","props","settings","onChange","Object","jsx","className","index_es","id","defaultMessage","setting_toggle","prefix","settingPath","label","React","PureComponent","connect","state","getIn","dispatch","key","checked","changeSetting","concat","onSave","saveSettings","messages","defineMessages","title","HomeTimeline","hasUnread","isPartial","_this","columnId","removeColumn","addColumn","dir","_this$props2","moveColumn","column","scrollTop","c","maxId","expandHomeTimeline","componentDidMount","_checkIfReloadNeeded","componentDidUpdate","prevProps","componentWillUnmount","_stopPolling","wasPartial","polling","setInterval","clearInterval","_this$props3","intl","shouldUpdateScroll","multiColumn","pinned","react_default","a","createElement","ref","setRef","formatMessage","column_header","icon","active","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","column_settings_container","status_list_container","trackScroll","scrollKey","onLoadMore","handleLoadMore","timelineId","emptyMessage","values","public","Link","to"],"mappings":"0NAOMA,EADUC,gHASdC,OAAA,WAAU,IAAAC,EACuBC,KAAKC,MAA5BC,EADAH,EACAG,SAAUC,EADVJ,EACUI,SAElB,OACEC,OAAAC,EAAA,EAAAD,CAAA,gBACEA,OAAAC,EAAA,EAAAD,CAAA,QAAME,UAAU,iCAAhB,EAA2CF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,6BAA6BC,eAAe,WAE5GL,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,6BAAf,EACEF,OAAAC,EAAA,EAAAD,CAACM,EAAA,EAAD,CAAeC,OAAO,gBAAgBT,SAAUA,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ACgF,EAAA,EAAD,CAAMC,GAAG,0BAAT,EAA6BjF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,oCAAoCC,eAAe,4BAC9R+C,mBAAoBA,SAjGH1C,IAAMC","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 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 />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |