Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma] / priv / static / packs / modals / mute_modal.js.map
index 0ea8d94c35c904b592b82d36eb000dda079d13de..ac6f90cadb67334cadea4f5a6f6443588d889bcb 100644 (file)
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/ui/components/mute_modal.js"],"names":["MuteModal","Object","react_redux__WEBPACK_IMPORTED_MODULE_5__","state","isSubmitting","getIn","account","notifications","dispatch","onConfirm","_actions_accounts__WEBPACK_IMPORTED_MODULE_10__","get","onClose","_actions_modal__WEBPACK_IMPORTED_MODULE_9__","onToggleNotifications","_actions_mutes__WEBPACK_IMPORTED_MODULE_11__","react_intl__WEBPACK_IMPORTED_MODULE_6__","handleClick","_this","props","handleCancel","setRef","c","button","toggleNotifications","componentDidMount","this","focus","render","_props","babel_runtime_helpers_jsx__WEBPACK_IMPORTED_MODULE_0___default","className","id","defaultMessage","values","name","htmlFor","react_toggle__WEBPACK_IMPORTED_MODULE_7___default","a","checked","onChange","_components_button__WEBPACK_IMPORTED_MODULE_8__","onClick","react__WEBPACK_IMPORTED_MODULE_4___default","createElement","ref","PureComponent"],"mappings":"8RAqCqBA,EAFpBC,OAAAC,EAAA,QAAAD,CAxBuB,SAAAE,GACtB,OACEC,aAAcD,EAAME,OAAO,UAAW,MAAO,iBAC7CC,QAASH,EAAME,OAAO,QAAS,MAAO,YACtCE,cAAeJ,EAAME,OAAO,QAAS,MAAO,oBAIrB,SAAAG,GACzB,OACEC,UADK,SACKH,EAASC,GACjBC,EAASP,OAAAS,EAAA,EAAAT,CAAYK,EAAQK,IAAI,MAAOJ,KAG1CK,QALK,WAMHJ,EAASP,OAAAY,EAAA,EAAAZ,KAGXa,sBATK,WAUHN,EAASP,OAAAc,EAAA,EAAAd,UAMdA,OAAAe,EAAA,EAAAf,8KAiBCgB,YAAc,WACZC,EAAKC,MAAMP,UACXM,EAAKC,MAAMV,UAAUS,EAAKC,MAAMb,QAASY,EAAKC,MAAMZ,kBAGtDa,aAAe,WACbF,EAAKC,MAAMP,aAGbS,OAAS,SAACC,GACRJ,EAAKK,OAASD,KAGhBE,oBAAsB,WACpBN,EAAKC,MAAML,kEAlBbW,6BACEC,KAAKH,OAAOI,qBAoBdC,kBAAU,IAAAC,EAC2BH,KAAKP,MAAhCb,EADAuB,EACAvB,QAASC,EADTsB,EACStB,cAEjB,OAAAuB,IAAA,OAAAC,UACiB,qCADjB,EAAAD,IAAA,OAAAC,UAEmB,8BAFnB,EAAAD,IAAA,cAAAA,IAISd,EAAA,GAJTgB,GAKa,6BALbC,eAMyB,wCANzBC,QAOoBC,KAAAL,IAAAK,uBAAgB7B,EAAQK,IAAI,aAPhDmB,IAAA,gBAAAA,IAAA,SAAAM,QAWuB,gDAXvB,EAAAN,IAYWd,EAAA,GAZXgB,GAY+B,gCAZ/BC,eAY8E,uCACnE,IAbXH,IAcWO,EAAAC,GAdXN,GAcqB,0CAdrBO,QAcwEhC,EAdxEiC,SAciGd,KAAKF,yBAdtGM,IAAA,OAAAC,UAmBmB,+BAnBnB,EAAAD,IAoBOW,EAAA,GApBPC,QAoBuBhB,KAAKN,aApB5BW,UAoBoD,kCApBpD,EAAAD,IAqBSd,EAAA,GArBTgB,GAqB6B,4BArB7BC,eAqBwE,YAElEU,EAAAL,EAAAM,cAACH,EAAA,GAAOC,QAAShB,KAAKT,YAAa4B,IAAKnB,KAAKL,QAA7CS,IACGd,EAAA,GADHgB,GACuB,6BADvBC,eACmE,gBA5DtCU,EAAAL,EAAMQ","file":"modals/mute_modal.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport Toggle from 'react-toggle';\nimport Button from '../../../components/button';\nimport { closeModal } from '../../../actions/modal';\nimport { muteAccount } from '../../../actions/accounts';\nimport { toggleHideNotifications } from '../../../actions/mutes';\n\n\nconst mapStateToProps = state => {\n  return {\n    isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),\n    account: state.getIn(['mutes', 'new', 'account']),\n    notifications: state.getIn(['mutes', 'new', 'notifications']),\n  };\n};\n\nconst mapDispatchToProps = dispatch => {\n  return {\n    onConfirm(account, notifications) {\n      dispatch(muteAccount(account.get('id'), notifications));\n    },\n\n    onClose() {\n      dispatch(closeModal());\n    },\n\n    onToggleNotifications() {\n      dispatch(toggleHideNotifications());\n    },\n  };\n};\n\n@connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nexport default class MuteModal extends React.PureComponent {\n\n  static propTypes = {\n    isSubmitting: PropTypes.bool.isRequired,\n    account: PropTypes.object.isRequired,\n    notifications: PropTypes.bool.isRequired,\n    onClose: PropTypes.func.isRequired,\n    onConfirm: PropTypes.func.isRequired,\n    onToggleNotifications: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  componentDidMount() {\n    this.button.focus();\n  }\n\n  handleClick = () => {\n    this.props.onClose();\n    this.props.onConfirm(this.props.account, this.props.notifications);\n  }\n\n  handleCancel = () => {\n    this.props.onClose();\n  }\n\n  setRef = (c) => {\n    this.button = c;\n  }\n\n  toggleNotifications = () => {\n    this.props.onToggleNotifications();\n  }\n\n  render () {\n    const { account, notifications } = this.props;\n\n    return (\n      <div className='modal-root__modal mute-modal'>\n        <div className='mute-modal__container'>\n          <p>\n            <FormattedMessage\n              id='confirmations.mute.message'\n              defaultMessage='Are you sure you want to mute {name}?'\n              values={{ name: <strong>@{account.get('acct')}</strong> }}\n            />\n          </p>\n          <div>\n            <label htmlFor='mute-modal__hide-notifications-checkbox'>\n              <FormattedMessage id='mute_modal.hide_notifications' defaultMessage='Hide notifications from this user?' />\n              {' '}\n              <Toggle id='mute-modal__hide-notifications-checkbox' checked={notifications} onChange={this.toggleNotifications} />\n            </label>\n          </div>\n        </div>\n\n        <div className='mute-modal__action-bar'>\n          <Button onClick={this.handleCancel} className='mute-modal__cancel-button'>\n            <FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />\n          </Button>\n          <Button onClick={this.handleClick} ref={this.setRef}>\n            <FormattedMessage id='confirmations.mute.confirm' defaultMessage='Mute' />\n          </Button>\n        </div>\n      </div>\n    );\n  }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/components/mute_modal.js"],"names":["MuteModal","connect","state","account","getIn","notifications","dispatch","onConfirm","muteAccount","get","onClose","closeModal","onToggleNotifications","toggleHideNotifications","injectIntl","props","c","button","componentDidMount","this","focus","render","className","id","defaultMessage","values","name","checked","onChange","toggleNotifications","htmlFor","onClick","handleCancel","handleClick","ref","setRef","React","PureComponent"],"mappings":"gQAoCMA,EAFUC,mBAvBQ,SAAAC,GACtB,MAAO,CACLC,QAASD,EAAME,MAAM,CAAC,QAAS,MAAO,YACtCC,cAAeH,EAAME,MAAM,CAAC,QAAS,MAAO,sBAIrB,SAAAE,GACzB,MAAO,CACLC,UADK,SACKJ,EAASE,GACjBC,EAASE,YAAYL,EAAQM,IAAI,MAAOJ,KAG1CK,QALK,WAMHJ,EAASK,gBAGXC,sBATK,WAUHN,EAASO,mB,GAMdC,Y,+LAgBe,WACZ,EAAKC,MAAML,UACX,EAAKK,MAAMR,UAAU,EAAKQ,MAAMZ,QAAS,EAAKY,MAAMV,kB,2CAGvC,WACb,EAAKU,MAAML,a,qCAGJ,SAACM,GACR,EAAKC,OAASD,K,kDAGM,WACpB,EAAKD,MAAMH,2B,8CAlBbM,kBAAA,WACEC,KAAKF,OAAOG,S,EAoBdC,OAAA,WAAW,IAAD,EAC2BF,KAAKJ,MAAhCZ,EADA,EACAA,QAASE,EADT,EACSA,cAEjB,OACE,mBAAKiB,UAAU,qCAAf,EACE,mBAAKA,UAAU,8BAAf,EACE,0BACE,YAAC,IAAD,CACEC,GAAG,6BACHC,eAAe,wCACfC,OAAQ,CAAEC,KAAM,mCAAUvB,EAAQM,IAAI,aAG1C,iBAAGa,UAAU,gCAAb,EACE,YAAC,IAAD,CACEC,GAAG,iCACHC,eAAe,8HAGnB,mBAAKF,UAAU,uBAAf,EACE,YAAC,IAAD,CAAQC,GAAG,0CAA0CI,QAAStB,EAAeuB,SAAUT,KAAKU,sBAC5F,qBAAOP,UAAU,wBAAwBQ,QAAQ,gDAAjD,EACE,YAAC,IAAD,CAAkBP,GAAG,gCAAgCC,eAAe,0CAK1E,mBAAKF,UAAU,+BAAf,EACE,YAAC,IAAD,CAAQS,QAASZ,KAAKa,aAAcV,UAAU,kCAA9C,EACE,YAAC,IAAD,CAAkBC,GAAG,4BAA4BC,eAAe,YAElE,kBAAC,IAAD,CAAQO,QAASZ,KAAKc,YAAaC,IAAKf,KAAKgB,QAC3C,YAAC,IAAD,CAAkBZ,GAAG,6BAA6BC,eAAe,a,GAhErDY,IAAMC,iB","file":"modals/mute_modal.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport Toggle from 'react-toggle';\nimport Button from '../../../components/button';\nimport { closeModal } from '../../../actions/modal';\nimport { muteAccount } from '../../../actions/accounts';\nimport { toggleHideNotifications } from '../../../actions/mutes';\n\n\nconst mapStateToProps = state => {\n  return {\n    account: state.getIn(['mutes', 'new', 'account']),\n    notifications: state.getIn(['mutes', 'new', 'notifications']),\n  };\n};\n\nconst mapDispatchToProps = dispatch => {\n  return {\n    onConfirm(account, notifications) {\n      dispatch(muteAccount(account.get('id'), notifications));\n    },\n\n    onClose() {\n      dispatch(closeModal());\n    },\n\n    onToggleNotifications() {\n      dispatch(toggleHideNotifications());\n    },\n  };\n};\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass MuteModal extends React.PureComponent {\n\n  static propTypes = {\n    account: PropTypes.object.isRequired,\n    notifications: PropTypes.bool.isRequired,\n    onClose: PropTypes.func.isRequired,\n    onConfirm: PropTypes.func.isRequired,\n    onToggleNotifications: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  componentDidMount() {\n    this.button.focus();\n  }\n\n  handleClick = () => {\n    this.props.onClose();\n    this.props.onConfirm(this.props.account, this.props.notifications);\n  }\n\n  handleCancel = () => {\n    this.props.onClose();\n  }\n\n  setRef = (c) => {\n    this.button = c;\n  }\n\n  toggleNotifications = () => {\n    this.props.onToggleNotifications();\n  }\n\n  render () {\n    const { account, notifications } = this.props;\n\n    return (\n      <div className='modal-root__modal mute-modal'>\n        <div className='mute-modal__container'>\n          <p>\n            <FormattedMessage\n              id='confirmations.mute.message'\n              defaultMessage='Are you sure you want to mute {name}?'\n              values={{ name: <strong>@{account.get('acct')}</strong> }}\n            />\n          </p>\n          <p className='mute-modal__explanation'>\n            <FormattedMessage\n              id='confirmations.mute.explanation'\n              defaultMessage='This will hide posts from them and posts mentioning them, but it will still allow them to see your posts and follow you.'\n            />\n          </p>\n          <div className='setting-toggle'>\n            <Toggle id='mute-modal__hide-notifications-checkbox' checked={notifications} onChange={this.toggleNotifications} />\n            <label className='setting-toggle__label' htmlFor='mute-modal__hide-notifications-checkbox'>\n              <FormattedMessage id='mute_modal.hide_notifications' defaultMessage='Hide notifications from this user?' />\n            </label>\n          </div>\n        </div>\n\n        <div className='mute-modal__action-bar'>\n          <Button onClick={this.handleCancel} className='mute-modal__cancel-button'>\n            <FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />\n          </Button>\n          <Button onClick={this.handleClick} ref={this.setRef}>\n            <FormattedMessage id='confirmations.mute.confirm' defaultMessage='Mute' />\n          </Button>\n        </div>\n      </div>\n    );\n  }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file