mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-13 19:16:15 +00:00
1 line
11 KiB
Plaintext
1 line
11 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/home_timeline/components/column_settings.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/home_timeline/containers/column_settings_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/home_timeline/index.js"],"names":["messages","defineMessages","filter_regex","settings","ColumnSettings","injectIntl","render","this","props","onChange","intl","className","id","defaultMessage","prefix","settingPath","label","formatMessage","React","PureComponent","connect","state","getIn","dispatch","path","checked","changeSetting","onSave","saveSettings","title","HomeTimeline","hasUnread","isPartial","columnId","removeColumn","addColumn","dir","moveColumn","column","scrollTop","c","maxId","expandHomeTimeline","componentDidMount","_checkIfReloadNeeded","componentDidUpdate","prevProps","componentWillUnmount","_stopPolling","wasPartial","polling","setInterval","clearInterval","multiColumn","pinned","ref","setRef","name","icon","active","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","trackScroll","scrollKey","onLoadMore","handleLoadMore","timelineId","emptyMessage","values","public","Link","to"],"mappings":"qOAOMA,EAAWC,YAAe,CAC9BC,aAAa,CAAD,2FACZC,SAAS,CAAD,uDAIJC,EADUC,Y,oGASdC,OAAA,WAAW,IAAD,EAC6BC,KAAKC,MAAlCL,EADA,EACAA,SAAUM,EADV,EACUA,SAAUC,EADpB,EACoBA,KAE5B,OACE,4BACE,oBAAMC,UAAU,iCAAhB,EAA2C,YAAC,IAAD,CAAkBC,GAAG,6BAA6BC,eAAe,WAE5G,mBAAKF,UAAU,6BAAf,EACE,YAAC,IAAD,CAAeG,OAAO,gBAAgBX,SAAUA,EAAUY,YAAa,CAAC,QAAS,UAAWN,SAAUA,EAAUO,MAAO,YAAC,IAAD,CAAkBJ,GAAG,oC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,OAAQ,CAAEC,OAAQ,YAACC,EAAA,EAAD,CAAMC,GAAG,0BAAT,EAA6B,YAAC,IAAD,CAAkB/D,GAAG,oCAAoCC,eAAe,gC,GA/F7QK,IAAMC,iB","file":"flavours/glitch/async/home_timeline.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport SettingToggle from 'flavours/glitch/features/notifications/components/setting_toggle';\nimport SettingText from 'flavours/glitch/components/setting_text';\n\nconst messages = defineMessages({\n filter_regex: { id: 'home.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },\n settings: { id: 'home.settings', defaultMessage: 'Column settings' },\n});\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, intl } = 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\n <div className='column-settings__row'>\n <SettingToggle prefix='home_timeline' settings={settings} settingPath={['shows', 'direct']} onChange={onChange} label={<FormattedMessage id='home.column_settings.show_direct' defaultMessage='Show DMs' />} />\n </div>\n\n <span className='column-settings__section'><FormattedMessage id='home.column_settings.advanced' defaultMessage='Advanced' /></span>\n\n <div className='column-settings__row'>\n <SettingText prefix='home_timeline' settings={settings} settingPath={['regex', 'body']} onChange={onChange} label={intl.formatMessage(messages.filter_regex)} />\n </div>\n </div>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport ColumnSettings from '../components/column_settings';\nimport { changeSetting, saveSettings } from 'flavours/glitch/actions/settings';\n\nconst mapStateToProps = state => ({\n settings: state.getIn(['settings', 'home']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n onChange (path, checked) {\n dispatch(changeSetting(['home', ...path], 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 'flavours/glitch/actions/timelines';\nimport PropTypes from 'prop-types';\nimport StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container';\nimport Column from 'flavours/glitch/components/column';\nimport ColumnHeader from 'flavours/glitch/components/column_header';\nimport { addColumn, removeColumn, moveColumn } from 'flavours/glitch/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 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, hasUnread, columnId, multiColumn } = this.props;\n const pinned = !!columnId;\n\n return (\n <Column ref={this.setRef} name='home' 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 />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |