forked from AkkomaGang/akkoma
1 line
No EOL
8 KiB
Text
1 line
No EOL
8 KiB
Text
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/components/domain.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/containers/domain_container.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/domain_blocks/index.js"],"names":["messages","defineMessages","unblockDomain","id","defaultMessage","Account","injectIntl","_this","props","onUnblockDomain","domain","render","_this$props","this","intl","Object","jsx","className","icon_button","active","icon","title","formatMessage","onClick","handleDomainUnblock","ImmutablePureComponent","PropTypes","string","func","isRequired","object","blockDomainConfirm","connect","state","_ref","obj","TypeError","_objectDestructuringEmpty","dispatch","_ref2","onBlockDomain","openModal","message","index_es","values","confirm","onConfirm","blockDomain","Domain","heading","Blocks","domains","getIn","debounce_default","expandDomainBlocks","leading","componentWillMount","fetchDomainBlocks","column","column_back_button_slim","scrollable_list","scrollKey","onLoadMore","handleLoadMore","map","domain_container","loading_indicator","params","ImmutablePropTypes","list"],"mappings":"8QAMMA,EAAWC,YAAe,CAC9BC,cAAa,CAAAC,GAAA,yBAAAC,eAAA,qBAIMC,EADpBC,qNASuB,WACpBC,EAAKC,MAAMC,gBAAgBF,EAAKC,MAAME,gDAGxCC,OAAA,WAAU,IAAAC,EACiBC,KAAKL,MAAtBE,EADAE,EACAF,OAAQI,EADRF,EACQE,KAEhB,OACEC,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,eAAf,EACEF,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,wBAAf,EACEF,OAAAC,EAAA,EAAAD,CAAA,QAAME,UAAU,4BAAhB,EACEF,OAAAC,EAAA,EAAAD,CAAA,mBAASL,IAGXK,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,wBAAf,EACEF,OAAAC,EAAA,EAAAD,CAACG,EAA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ACMuC,QAEd,OAAKA,EASHpC,OAAAC,EAAA,EAAAD,CAAC2C,EAAA,EAAD,CAAQtC,KAAK,eAAe6B,QAASnC,EAAKQ,cAActB,EAASiD,eAAjE,EACElC,OAAAC,EAAA,EAAAD,CAAC4C,EAAA,EAAD,IACA5C,OAAAC,EAAA,EAAAD,CAAC6C,EAAA,EAAD,CAAgBC,UAAU,gBAAgBC,WAAYjD,KAAKkD,qBAA3D,EACGZ,EAAQa,IAAI,SAAAtD,GAAM,OACjBK,OAAAC,EAAA,EAAAD,CAACkD,EAAD,CAA8BvD,OAAQA,GAAhBA,OAX1BK,OAAAC,EAAA,EAAAD,CAAC2C,EAAA,EAAD,UACE3C,OAAAC,EAAA,EAAAD,CAACmD,EAAA,EAAD,SAvB0BzC,+BAEf,CACjB0C,OAAQzC,IAAUI,OAAOD,WACzBS,SAAUZ,IAAUE,KAAKC,WACzBsB,QAASiB,IAAmBC,KAC5BvD,KAAMY,IAAUI,OAAOD","file":"flavours/glitch/async/domain_blocks.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport IconButton from './icon_button';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\nconst messages = defineMessages({\n unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unhide {domain}' },\n});\n\n@injectIntl\nexport default class Account extends ImmutablePureComponent {\n\n static propTypes = {\n domain: PropTypes.string,\n onUnblockDomain: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n handleDomainUnblock = () => {\n this.props.onUnblockDomain(this.props.domain);\n }\n\n render () {\n const { domain, intl } = this.props;\n\n return (\n <div className='domain'>\n <div className='domain__wrapper'>\n <span className='domain__domain-name'>\n <strong>{domain}</strong>\n </span>\n\n <div className='domain__buttons'>\n <IconButton active icon='unlock' title={intl.formatMessage(messages.unblockDomain, { domain })} onClick={this.handleDomainUnblock} />\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { blockDomain, unblockDomain } from '../actions/domain_blocks';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport Domain from '../components/domain';\nimport { openModal } from '../actions/modal';\n\nconst messages = defineMessages({\n blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' },\n});\n\nconst makeMapStateToProps = () => {\n const mapStateToProps = (state, { }) => ({\n });\n\n return mapStateToProps;\n};\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n onBlockDomain (domain) {\n dispatch(openModal('CONFIRM', {\n message: <FormattedMessage id='confirmations.domain_block.message' defaultMessage='Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.' values={{ domain: <strong>{domain}</strong> }} />,\n confirm: intl.formatMessage(messages.blockDomainConfirm),\n onConfirm: () => dispatch(blockDomain(domain)),\n }));\n },\n\n onUnblockDomain (domain) {\n dispatch(unblockDomain(domain));\n },\n});\n\nexport default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Domain));\n","export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n}","import React from 'react';\nimport { connect } from 'react-redux';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport LoadingIndicator from '../../components/loading_indicator';\nimport Column from '../ui/components/column';\nimport ColumnBackButtonSlim from '../../components/column_back_button_slim';\nimport DomainContainer from '../../containers/domain_container';\nimport { fetchDomainBlocks, expandDomainBlocks } from '../../actions/domain_blocks';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { debounce } from 'lodash';\nimport ScrollableList from '../../components/scrollable_list';\n\nconst messages = defineMessages({\n heading: { id: 'column.domain_blocks', defaultMessage: 'Hidden domains' },\n unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unhide {domain}' },\n});\n\nconst mapStateToProps = state => ({\n domains: state.getIn(['domain_lists', 'blocks', 'items']),\n});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class Blocks extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n domains: ImmutablePropTypes.list,\n intl: PropTypes.object.isRequired,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchDomainBlocks());\n }\n\n handleLoadMore = debounce(() => {\n this.props.dispatch(expandDomainBlocks());\n }, 300, { leading: true });\n\n render () {\n const { intl, domains } = this.props;\n\n if (!domains) {\n return (\n <Column>\n <LoadingIndicator />\n </Column>\n );\n }\n\n return (\n <Column icon='minus-circle' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n <ScrollableList scrollKey='domain_blocks' onLoadMore={this.handleLoadMore}>\n {domains.map(domain =>\n <DomainContainer key={domain} domain={domain} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |