mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-28 11:13:57 +00:00
1 line
11 KiB
Plaintext
1 line
11 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/home_timeline/components/column_settings.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/home_timeline/containers/column_settings_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/home_timeline/index.js"],"names":["messages","defineMessages","filter_regex","id","defaultMessage","settings","ColumnSettings","injectIntl","render","_this$props","this","props","onChange","intl","Object","jsx","className","index_es","setting_toggle","prefix","settingPath","label","setting_text","formatMessage","React","PureComponent","connect","state","getIn","dispatch","path","checked","changeSetting","concat","onSave","saveSettings","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","multiColumn","pinned","react_default","a","createElement","ref","setRef","name","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":"mOAOMA,EAAWC,YAAe,CAC9BC,aAAY,CAAAC,GAAA,oCAAAC,eAAA,qCACZC,SAAQ,CAAAF,GAAA,gBAAAC,eAAA,qBAIWE,EADpBC,gHASCC,OAAA,WAAU,IAAAC,EAC6BC,KAAKC,MAAlCN,EADAI,EACAJ,SAAUO,EADVH,EACUG,SAAUC,EADpBJ,EACoBI,KAE5B,OACEC,OAAAC,EAAA,EAAAD,CAAA,gBACEA,OAAAC,EAAA,EAAAD,CAAA,QAAME,UAAU,iCAAhB,EAA2CF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBd,GAAG,6BAA6B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,KAAMyB,EADNwB,EACMxB,UAAWG,EADjBqB,EACiBrB,SAAUsB,EAD3BD,EAC2BC,YAC7BC,IAAWvB,EAEjB,OACEwB,EAAAC,EAAAC,cAACpB,EAAA,EAAD,CAAQqB,IAAK1D,KAAK2D,OAAQC,KAAK,OAAOjD,MAAOR,EAAKU,cAAcvB,EAASoC,QACvEtB,OAAAC,EAAA,EAAAD,CAACyD,EAAA,EAAD,CACEC,KAAK,OACLC,OAAQnC,EACRF,MAAOvB,EAAKU,cAAcvB,EAASoC,OACnCsC,MAAOhE,KAAKiE,UACZC,OAAQlE,KAAKmE,WACbC,QAASpE,KAAKqE,kBACdf,OAAQA,EACRD,YAAaA,QARf,EAUEjD,OAAAC,EAAA,EAAAD,CAACkE,EAAD,KAGFlE,OAAAC,EAAA,EAAAD,CAACmE,EAAA,EAAD,CACEC,aAAclB,EACdmB,UAAS,iBAAmB1C,EAC5B2C,WAAY1E,KAAK2E,eACjBC,WAAW,OACXC,aAAczE,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBd,GAAG,oBAAoBC,eAAe,iGAAiGoF,OAAQ,CAAEC,OAAQ3E,OAAAC,EAAA,EAAAD,CAAC4E,EAAA,EAAD,CAAMC,GAAG,0BAAT,EAA6B7E,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBd,GAAG,oCAAoCC,eAAe,mCA/F9PoB,IAAMC","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\n@injectIntl\nexport default class 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\n@connect(mapStateToProps)\n@injectIntl\nexport default class 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":""} |