forked from AkkomaGang/akkoma
1 line
No EOL
8.2 KiB
Text
1 line
No EOL
8.2 KiB
Text
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/components/domain.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/containers/domain_container.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/domain_blocks/index.js"],"names":["messages","defineMessages","unblockDomain","Account","injectIntl","props","onUnblockDomain","domain","render","this","intl","className","active","icon","title","formatMessage","onClick","handleDomainUnblock","ImmutablePureComponent","PropTypes","string","func","isRequired","object","blockDomainConfirm","connect","state","obj","TypeError","dispatch","onBlockDomain","openModal","message","id","defaultMessage","values","confirm","onConfirm","blockDomain","Domain","heading","Blocks","domains","getIn","hasMore","expandDomainBlocks","leading","componentWillMount","fetchDomainBlocks","multiColumn","emptyMessage","bindToDocument","scrollKey","onLoadMore","handleLoadMore","map","params","bool","ImmutablePropTypes","list"],"mappings":"6QAMMA,EAAWC,YAAe,CAC9BC,cAAc,CAAD,gEAITC,EADUC,a,yMASQ,WACpB,EAAKC,MAAMC,gBAAgB,EAAKD,MAAME,W,sCAGxCC,OAAA,WAAW,IAAD,EACiBC,KAAKJ,MAAtBE,EADA,EACAA,OAAQG,EADR,EACQA,KAEhB,OACE,mBAAKC,UAAU,eAAf,EACE,mBAAKA,UAAU,wBAAf,EACE,oBAAMA,UAAU,4BAAhB,EACE,+BAASJ,IAGX,mBAAKI,UAAU,wBAAf,EACE,YAAC,IAAD,CAAYC,QAAM,EAACC,KAAK,SAASC,MAAOJ,EAAKK,cAAcf,EAASE,cAAe,CAAEK,WAAWS,QAASP,KAAKQ,0B,GAvBpGC,K,0BAED,CACjBX,OAAQY,IAAUC,OAClBd,gBAAiBa,IAAUE,KAAKC,WAChCZ,KAAMS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C,IAAD,IACA,YAAC,IAAD,CACEY,UAAU,gBACVC,WAAY5C,KAAK6C,eACjBV,QAASA,EACTM,aAAcA,EACdC,gBAAiBF,QALnB,EAOGP,EAAQa,KAAI,SAAAhD,GAAM,OACjB,YAAC,EAAD,CAA8BA,OAAQA,GAAhBA,S,GA3CbW,K,0BAEA,CACjBsC,OAAQrC,IAAUI,OAAOD,WACzBO,SAAUV,IAAUE,KAAKC,WACzBsB,QAASzB,IAAUsC,KACnBf,QAASgB,IAAmBC,KAC5BjD,KAAMS,IAAUI,OAAOD,WACvB2B,YAAa9B,IAAUsC,O","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\nexport default @injectIntl\nclass 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 { debounce } from 'lodash';\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, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ScrollableList from 'flavours/glitch/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 hasMore: !!state.getIn(['domain_lists', 'blocks', 'next']),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Blocks extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n hasMore: PropTypes.bool,\n domains: ImmutablePropTypes.list,\n intl: PropTypes.object.isRequired,\n multiColumn: PropTypes.bool,\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, hasMore, multiColumn } = this.props;\n\n if (!domains) {\n return (\n <Column>\n <LoadingIndicator />\n </Column>\n );\n }\n\n const emptyMessage = <FormattedMessage id='empty_column.domain_blocks' defaultMessage='There are no hidden domains yet.' />;\n\n return (\n <Column bindToDocument={!multiColumn} icon='minus-circle' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n <ScrollableList\n scrollKey='domain_blocks'\n onLoadMore={this.handleLoadMore}\n hasMore={hasMore}\n emptyMessage={emptyMessage}\n bindToDocument={!multiColumn}\n >\n {domains.map(domain =>\n <DomainContainer key={domain} domain={domain} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |