diff options
Diffstat (limited to 'priv/static/packs/modals')
-rw-r--r-- | priv/static/packs/modals/embed_modal.js | 2 | ||||
-rw-r--r-- | priv/static/packs/modals/embed_modal.js.map | 2 | ||||
-rw-r--r-- | priv/static/packs/modals/mute_modal.js | 2 | ||||
-rw-r--r-- | priv/static/packs/modals/mute_modal.js.map | 2 | ||||
-rw-r--r-- | priv/static/packs/modals/report_modal.js | 2 | ||||
-rw-r--r-- | priv/static/packs/modals/report_modal.js.map | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/priv/static/packs/modals/embed_modal.js b/priv/static/packs/modals/embed_modal.js index cdca61e8e..98fbe0bf6 100644 --- a/priv/static/packs/modals/embed_modal.js +++ b/priv/static/packs/modals/embed_modal.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[173],{697:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return j});var i,o,n,r=a(1),c=a(6),s=a(0),d=a(2),l=a(3),b=a.n(l),m=a(5),u=a.n(m),f=a(24),h=a(7),p=a(9),j=Object(h.g)((n=o=function(o){function e(){for(var t,e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return t=o.call.apply(o,[this].concat(a))||this,Object(d.a)(Object(s.a)(Object(s.a)(t)),"state",{loading:!1,oembed:null}),Object(d.a)(Object(s.a)(Object(s.a)(t)),"setIframeRef",function(e){t.iframe=e}),Object(d.a)(Object(s.a)(Object(s.a)(t)),"handleTextareaClick",function(e){e.target.select()}),t}Object(c.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){var a=this,e=this.props.url;this.setState({loading:!0}),Object(p.a)().post("/api/web/embed",{url:e}).then(function(e){a.setState({loading:!1,oembed:e.data});var t=a.iframe.contentWindow.document;t.open(),t.write(e.data.html),t.close(),t.body.style.margin=0,a.iframe.width=t.body.scrollWidth,a.iframe.height=t.body.scrollHeight}).catch(function(e){a.props.onError(e)})},t.render=function(){var e=this.state.oembed;return Object(r.a)("div",{className:"modal-root__modal embed-modal"},void 0,Object(r.a)("h4",{},void 0,Object(r.a)(h.b,{id:"status.embed",defaultMessage:"Embed"})),Object(r.a)("div",{className:"embed-modal__container"},void 0,Object(r.a)("p",{className:"hint"},void 0,Object(r.a)(h.b,{id:"embed.instructions",defaultMessage:"Embed this status on your website by copying the code below."})),Object(r.a)("input",{type:"text",className:"embed-modal__html",readOnly:!0,value:e&&e.html||"",onClick:this.handleTextareaClick}),Object(r.a)("p",{className:"hint"},void 0,Object(r.a)(h.b,{id:"embed.preview",defaultMessage:"Here is what it will look like:"})),b.a.createElement("iframe",{className:"embed-modal__iframe",frameBorder:"0",ref:this.setIframeRef,sandbox:"allow-same-origin",title:"preview"})))},e}(f.a),Object(d.a)(o,"propTypes",{url:u.a.string.isRequired,onClose:u.a.func.isRequired,onError:u.a.func.isRequired,intl:u.a.object.isRequired}),i=n))||i}}]); +(window.webpackJsonp=window.webpackJsonp||[]).push([[173],{698:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return j});var i,o,n,r=a(1),c=a(6),s=a(0),d=a(2),l=a(3),b=a.n(l),m=a(5),u=a.n(m),f=a(24),h=a(7),p=a(9),j=Object(h.g)((n=o=function(o){function e(){for(var t,e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return t=o.call.apply(o,[this].concat(a))||this,Object(d.a)(Object(s.a)(Object(s.a)(t)),"state",{loading:!1,oembed:null}),Object(d.a)(Object(s.a)(Object(s.a)(t)),"setIframeRef",function(e){t.iframe=e}),Object(d.a)(Object(s.a)(Object(s.a)(t)),"handleTextareaClick",function(e){e.target.select()}),t}Object(c.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){var a=this,e=this.props.url;this.setState({loading:!0}),Object(p.a)().post("/api/web/embed",{url:e}).then(function(e){a.setState({loading:!1,oembed:e.data});var t=a.iframe.contentWindow.document;t.open(),t.write(e.data.html),t.close(),t.body.style.margin=0,a.iframe.width=t.body.scrollWidth,a.iframe.height=t.body.scrollHeight}).catch(function(e){a.props.onError(e)})},t.render=function(){var e=this.state.oembed;return Object(r.a)("div",{className:"modal-root__modal embed-modal"},void 0,Object(r.a)("h4",{},void 0,Object(r.a)(h.b,{id:"status.embed",defaultMessage:"Embed"})),Object(r.a)("div",{className:"embed-modal__container"},void 0,Object(r.a)("p",{className:"hint"},void 0,Object(r.a)(h.b,{id:"embed.instructions",defaultMessage:"Embed this status on your website by copying the code below."})),Object(r.a)("input",{type:"text",className:"embed-modal__html",readOnly:!0,value:e&&e.html||"",onClick:this.handleTextareaClick}),Object(r.a)("p",{className:"hint"},void 0,Object(r.a)(h.b,{id:"embed.preview",defaultMessage:"Here is what it will look like:"})),b.a.createElement("iframe",{className:"embed-modal__iframe",frameBorder:"0",ref:this.setIframeRef,sandbox:"allow-same-origin",title:"preview"})))},e}(f.a),Object(d.a)(o,"propTypes",{url:u.a.string.isRequired,onClose:u.a.func.isRequired,onError:u.a.func.isRequired,intl:u.a.object.isRequired}),i=n))||i}}]); //# sourceMappingURL=embed_modal.js.map
\ No newline at end of file diff --git a/priv/static/packs/modals/embed_modal.js.map b/priv/static/packs/modals/embed_modal.js.map index a50e74ffc..6d1afd2ef 100644 --- a/priv/static/packs/modals/embed_modal.js.map +++ b/priv/static/packs/modals/embed_modal.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/ui/components/embed_modal.js"],"names":["EmbedModal","injectIntl","loading","oembed","c","_this","iframe","e","target","select","componentDidMount","_this2","this","url","props","setState","api","post","then","res","data","iframeDocument","contentWindow","document","open","write","html","close","body","style","margin","width","scrollWidth","height","scrollHeight","catch","error","onError","render","state","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","className","react_intl__WEBPACK_IMPORTED_MODULE_7__","id","defaultMessage","type","readOnly","value","onClick","handleTextareaClick","react__WEBPACK_IMPORTED_MODULE_4___default","a","createElement","frameBorder","ref","setIframeRef","sandbox","title","Immutabl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AA,KAAGE,UAAU,aAAb,EACEF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,gBAAgBC,eAAe,qCAGtDM,EAAAC,EAAAC,cAAA,UACEX,UAAU,sBACVY,YAAY,IACZC,IAAK3C,KAAK4C,aACVC,QAAQ,oBACRC,MAAM,kBAzEOC,+BAEJ,CACjB9C,IAAK+C,IAAUC,OAAOC,WACtBC,QAASH,IAAUI,KAAKF,WACxBzB,QAASuB,IAAUI,KAAKF,WACxBG,KAAML,IAAUM,OAAOJ","file":"modals/embed_modal.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport api from '../../../api';\n\nexport default @injectIntl\nclass EmbedModal extends ImmutablePureComponent {\n\n static propTypes = {\n url: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n onError: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n }\n\n state = {\n loading: false,\n oembed: null,\n };\n\n componentDidMount () {\n const { url } = this.props;\n\n this.setState({ loading: true });\n\n api().post('/api/web/embed', { url }).then(res => {\n this.setState({ loading: false, oembed: res.data });\n\n const iframeDocument = this.iframe.contentWindow.document;\n\n iframeDocument.open();\n iframeDocument.write(res.data.html);\n iframeDocument.close();\n\n iframeDocument.body.style.margin = 0;\n this.iframe.width = iframeDocument.body.scrollWidth;\n this.iframe.height = iframeDocument.body.scrollHeight;\n }).catch(error => {\n this.props.onError(error);\n });\n }\n\n setIframeRef = c => {\n this.iframe = c;\n }\n\n handleTextareaClick = (e) => {\n e.target.select();\n }\n\n render () {\n const { oembed } = this.state;\n\n return (\n <div className='modal-root__modal embed-modal'>\n <h4><FormattedMessage id='status.embed' defaultMessage='Embed' /></h4>\n\n <div className='embed-modal__container'>\n <p className='hint'>\n <FormattedMessage id='embed.instructions' defaultMessage='Embed this status on your website by copying the code below.' />\n </p>\n\n <input\n type='text'\n className='embed-modal__html'\n readOnly\n value={oembed && oembed.html || ''}\n onClick={this.handleTextareaClick}\n />\n\n <p className='hint'>\n <FormattedMessage id='embed.preview' defaultMessage='Here is what it will look like:' />\n </p>\n\n <iframe\n className='embed-modal__iframe'\n frameBorder='0'\n ref={this.setIframeRef}\n sandbox='allow-same-origin'\n title='preview'\n />\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/components/embed_modal.js"],"names":["EmbedModal","injectIntl","loading","oembed","c","_this","iframe","e","target","select","componentDidMount","_this2","this","url","props","setState","api","post","then","res","data","iframeDocument","contentWindow","document","open","write","html","close","body","style","margin","width","scrollWidth","height","scrollHeight","catch","error","onError","render","state","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","className","react_intl__WEBPACK_IMPORTED_MODULE_7__","id","defaultMessage","type","readOnly","value","onClick","handleTextareaClick","react__WEBPACK_IMPORTED_MODULE_4___default","a","createElement","frameBorder","ref","setIframeRef","sandbox","title","ImmutablePureComponent","PropTypes","string","isRequired","onClose","func","intl","object"],"mappings":"qOAOMA,EADUC,oNAUN,CACNC,SAAS,EACTC,OAAQ,8DAyBK,SAAAC,GACbC,EAAKC,OAASF,kEAGM,SAACG,GACrBA,EAAEC,OAAOC,yDA3BXC,kBAAA,WAAqB,IAAAC,EAAAC,KACXC,EAAQD,KAAKE,MAAbD,IAERD,KAAKG,SAAS,CAAEb,SAAS,IAEzBc,cAAMC,KAAK,iBAAkB,CAAEJ,QAAOK,KAAK,SAAAC,GACzCR,EAAKI,SAAS,CAAEb,SAAS,EAAOC,OAAQgB,EAAIC,OAE5C,IAAMC,EAAiBV,EAAKL,OAAOgB,cAAcC,SAEjDF,EAAeG,OACfH,EAAeI,MAAMN,EAAIC,KAAKM,MAC9BL,EAAeM,QAEfN,EAAeO,KAAKC,MAAMC,OAAS,EACnCnB,EAAKL,OAAOyB,MAASV,EAAeO,KAAKI,YACzCrB,EAAKL,OAAO2B,OAASZ,EAAeO,KAAKM,eACxCC,MAAM,SAAAC,GACPzB,EAAKG,MAAMuB,QAAQD,QAYvBE,OAAA,WAAU,IACAnC,EAAWS,KAAK2B,MAAhBpC,OAER,OACEqC,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,sCAAf,EACEF,OAAAC,EAAA,EAAAD,CAAA,eAAIA,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,eAAeC,eAAe,WAEvDL,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,+BAAf,EACEF,OAAAC,EAAA,EAAAD,CAAA,KAAGE,UAAU,aAAb,EACEF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,qBAAqBC,eAAe,kEAG3DL,OAAAC,EAAA,EAAAD,CAAA,SACEM,KAAK,OACLJ,UAAU,oBACVK,UAAQ,EACRC,MAAO7C,GAAUA,EAAOuB,MAAQ,GAChCuB,QAASrC,KAAKsC,sBAGhBV,OAAAC,EAAA,EAAAD,CAAA,KAAGE,UAAU,aAAb,EACEF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,gBAAgBC,eAAe,qCAGtDM,EAAAC,EAAAC,cAAA,UACEX,UAAU,sBACVY,YAAY,IACZC,IAAK3C,KAAK4C,aACVC,QAAQ,oBACRC,MAAM,kBAzEOC,+BAEJ,CACjB9C,IAAK+C,IAAUC,OAAOC,WACtBC,QAASH,IAAUI,KAAKF,WACxBzB,QAASuB,IAAUI,KAAKF,WACxBG,KAAML,IAAUM,OAAOJ","file":"modals/embed_modal.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport api from '../../../api';\n\nexport default @injectIntl\nclass EmbedModal extends ImmutablePureComponent {\n\n static propTypes = {\n url: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n onError: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n }\n\n state = {\n loading: false,\n oembed: null,\n };\n\n componentDidMount () {\n const { url } = this.props;\n\n this.setState({ loading: true });\n\n api().post('/api/web/embed', { url }).then(res => {\n this.setState({ loading: false, oembed: res.data });\n\n const iframeDocument = this.iframe.contentWindow.document;\n\n iframeDocument.open();\n iframeDocument.write(res.data.html);\n iframeDocument.close();\n\n iframeDocument.body.style.margin = 0;\n this.iframe.width = iframeDocument.body.scrollWidth;\n this.iframe.height = iframeDocument.body.scrollHeight;\n }).catch(error => {\n this.props.onError(error);\n });\n }\n\n setIframeRef = c => {\n this.iframe = c;\n }\n\n handleTextareaClick = (e) => {\n e.target.select();\n }\n\n render () {\n const { oembed } = this.state;\n\n return (\n <div className='modal-root__modal embed-modal'>\n <h4><FormattedMessage id='status.embed' defaultMessage='Embed' /></h4>\n\n <div className='embed-modal__container'>\n <p className='hint'>\n <FormattedMessage id='embed.instructions' defaultMessage='Embed this status on your website by copying the code below.' />\n </p>\n\n <input\n type='text'\n className='embed-modal__html'\n readOnly\n value={oembed && oembed.html || ''}\n onClick={this.handleTextareaClick}\n />\n\n <p className='hint'>\n <FormattedMessage id='embed.preview' defaultMessage='Here is what it will look like:' />\n </p>\n\n <iframe\n className='embed-modal__iframe'\n frameBorder='0'\n ref={this.setIframeRef}\n sandbox='allow-same-origin'\n title='preview'\n />\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file diff --git a/priv/static/packs/modals/mute_modal.js b/priv/static/packs/modals/mute_modal.js index fe11c7788..28cc4ad81 100644 --- a/priv/static/packs/modals/mute_modal.js +++ b/priv/static/packs/modals/mute_modal.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[174],{696:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return g});var o,c=n(1),i=n(6),s=n(0),u=n(2),a=n(3),r=n.n(a),l=n(20),d=n(7),b=n(390),f=n.n(b),m=n(178),j=n(49),O=n(27),p=n(142),g=Object(l.connect)(function(t){return{isSubmitting:t.getIn(["reports","new","isSubmitting"]),account:t.getIn(["mutes","new","account"]),notifications:t.getIn(["mutes","new","notifications"])}},function(n){return{onConfirm:function(t,e){n(Object(O.G)(t.get("id"),e))},onClose:function(){n(Object(j.c)())},onToggleNotifications:function(){n(Object(p.h)())}}})(o=Object(d.g)(o=function(a){function t(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=a.call.apply(a,[this].concat(n))||this,Object(u.a)(Object(s.a)(Object(s.a)(e)),"handleClick",function(){e.props.onClose(),e.props.onConfirm(e.props.account,e.props.notifications)}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"handleCancel",function(){e.props.onClose()}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"setRef",function(t){e.button=t}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"toggleNotifications",function(){e.props.onToggleNotifications()}),e}Object(i.a)(t,a);var e=t.prototype;return e.componentDidMount=function(){this.button.focus()},e.render=function(){var t=this.props,e=t.account,n=t.notifications;return Object(c.a)("div",{className:"modal-root__modal mute-modal"},void 0,Object(c.a)("div",{className:"mute-modal__container"},void 0,Object(c.a)("p",{},void 0,Object(c.a)(d.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:Object(c.a)("strong",{},void 0,"@",e.get("acct"))}})),Object(c.a)("div",{},void 0,Object(c.a)("label",{htmlFor:"mute-modal__hide-notifications-checkbox"},void 0,Object(c.a)(d.b,{id:"mute_modal.hide_notifications",defaultMessage:"Hide notifications from this user?"})," ",Object(c.a)(f.a,{id:"mute-modal__hide-notifications-checkbox",checked:n,onChange:this.toggleNotifications})))),Object(c.a)("div",{className:"mute-modal__action-bar"},void 0,Object(c.a)(m.a,{onClick:this.handleCancel,className:"mute-modal__cancel-button"},void 0,Object(c.a)(d.b,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"})),r.a.createElement(m.a,{onClick:this.handleClick,ref:this.setRef},Object(c.a)(d.b,{id:"confirmations.mute.confirm",defaultMessage:"Mute"}))))},t}(r.a.PureComponent))||o)||o}}]); +(window.webpackJsonp=window.webpackJsonp||[]).push([[174],{697:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return g});var o,c=n(1),i=n(6),s=n(0),u=n(2),a=n(3),r=n.n(a),l=n(20),d=n(7),b=n(391),f=n.n(b),m=n(181),j=n(50),O=n(27),p=n(143),g=Object(l.connect)(function(t){return{isSubmitting:t.getIn(["reports","new","isSubmitting"]),account:t.getIn(["mutes","new","account"]),notifications:t.getIn(["mutes","new","notifications"])}},function(n){return{onConfirm:function(t,e){n(Object(O.G)(t.get("id"),e))},onClose:function(){n(Object(j.c)())},onToggleNotifications:function(){n(Object(p.h)())}}})(o=Object(d.g)(o=function(a){function t(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=a.call.apply(a,[this].concat(n))||this,Object(u.a)(Object(s.a)(Object(s.a)(e)),"handleClick",function(){e.props.onClose(),e.props.onConfirm(e.props.account,e.props.notifications)}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"handleCancel",function(){e.props.onClose()}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"setRef",function(t){e.button=t}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"toggleNotifications",function(){e.props.onToggleNotifications()}),e}Object(i.a)(t,a);var e=t.prototype;return e.componentDidMount=function(){this.button.focus()},e.render=function(){var t=this.props,e=t.account,n=t.notifications;return Object(c.a)("div",{className:"modal-root__modal mute-modal"},void 0,Object(c.a)("div",{className:"mute-modal__container"},void 0,Object(c.a)("p",{},void 0,Object(c.a)(d.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:Object(c.a)("strong",{},void 0,"@",e.get("acct"))}})),Object(c.a)("div",{},void 0,Object(c.a)("label",{htmlFor:"mute-modal__hide-notifications-checkbox"},void 0,Object(c.a)(d.b,{id:"mute_modal.hide_notifications",defaultMessage:"Hide notifications from this user?"})," ",Object(c.a)(f.a,{id:"mute-modal__hide-notifications-checkbox",checked:n,onChange:this.toggleNotifications})))),Object(c.a)("div",{className:"mute-modal__action-bar"},void 0,Object(c.a)(m.a,{onClick:this.handleCancel,className:"mute-modal__cancel-button"},void 0,Object(c.a)(d.b,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"})),r.a.createElement(m.a,{onClick:this.handleClick,ref:this.setRef},Object(c.a)(d.b,{id:"confirmations.mute.confirm",defaultMessage:"Mute"}))))},t}(r.a.PureComponent))||o)||o}}]); //# sourceMappingURL=mute_modal.js.map
\ No newline at end of file diff --git a/priv/static/packs/modals/mute_modal.js.map b/priv/static/packs/modals/mute_modal.js.map index 914bc0f9b..142cfdafe 100644 --- a/priv/static/packs/modals/mute_modal.js.map +++ b/priv/static/packs/modals/mute_modal.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/ui/components/mute_modal.js"],"names":["MuteModal","connect","state","isSubmitting","getIn","account","notifications","dispatch","onConfirm","muteAccount","get","onClose","closeModal","onToggleNotifications","toggleHideNotifications","injectIntl","_this","props","c","button","componentDidMount","this","focus","render","_this$props","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","className","react_intl__WEBPACK_IMPORTED_MODULE_6__","id","defaultMessage","values","name","htmlFor","react_toggle__WEBPACK_IMPORTED_MODULE_7___default","a","checked","onChange","toggleNotifications","_components_button__WEBPACK_IMPORTED_MODULE_8__","onClick","handleCancel","react__WEBPACK_IMPORTED_MODULE_4___default","createElement","handleClick","ref","setRef","React","PureComponent"],"mappings":"8PAqCMA,EAFUC,kBAxBQ,SAAAC,GACtB,MAAO,CACLC,aAAcD,EAAME,MAAM,CAAC,UAAW,MAAO,iBAC7CC,QAASH,EAAME,MAAM,CAAC,QAAS,MAAO,YACtCE,cA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AC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,4BAA4BC,eAAe,YAElEY,EAAAP,EAAAQ,cAACJ,EAAA,EAAD,CAAQC,QAASnB,KAAKuB,YAAaC,IAAKxB,KAAKyB,QAC3CrB,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,6BAA6BC,eAAe,gBA5DrDiB,IAAMC","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\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass 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/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/components/mute_modal.js"],"names":["MuteModal","connect","state","isSubmitting","getIn","account","notifications","dispatch","onConfirm","muteAccount","get","onClose","closeModal","onToggleNotifications","toggleHideNotifications","injectIntl","_this","props","c","button","componentDidMount","this","focus","render","_this$props","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","className","react_intl__WEBPACK_IMPORTED_MODULE_6__","id","defaultMessage","values","name","htmlFor","react_toggle__WEBPACK_IMPORTED_MODULE_7___default","a","checked","onChange","toggleNotifications","_components_button__WEBPACK_IMPORTED_MODULE_8__","onClick","handleCancel","react__WEBPACK_IMPORTED_MODULE_4___default","createElement","handleClick","ref","setRef","React","PureComponent"],"mappings":"8PAqCMA,EAFUC,kBAxBQ,SAAAC,GACtB,MAAO,CACLC,aAAcD,EAAME,MAAM,CAAC,UAAW,MAAO,iBAC7CC,QAASH,EAAME,MAAM,CAAC,QAAS,MAAO,YACtC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,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,4BAA4BC,eAAe,YAElEY,EAAAP,EAAAQ,cAACJ,EAAA,EAAD,CAAQC,QAASnB,KAAKuB,YAAaC,IAAKxB,KAAKyB,QAC3CrB,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,6BAA6BC,eAAe,gBA5DrDiB,IAAMC","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\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass 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 diff --git a/priv/static/packs/modals/report_modal.js b/priv/static/packs/modals/report_modal.js index f2bd5b8f4..91fe8626f 100644 --- a/priv/static/packs/modals/report_modal.js +++ b/priv/static/packs/modals/report_modal.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[175],{718:function(e,t,a){"use strict";a.r(t);var n,o,i,d=a(1),c=a(6),r=a(0),s=a(2),l=a(3),u=a.n(l),b=a(20),p=a(91),g=a(36),h=a(5),m=a.n(h),O=a(26),j=a.n(O),f=a(154),v=a(7),w=a(390),_=a.n(w),y=a(964),C=a.n(y),k=a(173),I=a(47),M=a(283),N=function(e){function t(){return e.apply(this,arguments)||this}return Object(c.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.status,a=e.checked,n=e.onToggle,o=e.disabled,i=null;if(t.get("reblog"))return null;if(0<t.get("media_attachments").size)if(t.get("media_attachments").some(function(e){return"unknown"===e.get("type")}));else if("video"===t.getIn(["media_attachments",0,"type"])){var c=t.getIn(["media_attachments",0]);i=Object(d.a)(M.a,{fetchComponent:I.G,loading:this.renderLoadingVideoPlayer},void 0,function(e){return Object(d.a)(e,{preview:c.get("preview_url"),src:c.get("url"),alt:c.get("description"),width:239,height:110,inline:!0,sensitive:t.get("sensitive"),onOpenVideo:C.a})})}else i=Object(d.a)(M.a,{fetchComponent:I.x,loading:this.renderLoadingMediaGallery},void 0,function(e){return Object(d.a)(e,{media:t.get("media_attachments"),sensitive:t.get("sensitive"),height:110,onOpenMedia:C.a})});return Object(d.a)("div",{className:"status-check-box"},void 0,Object(d.a)("div",{className:"status-check-box__status"},void 0,Object(d.a)(k.a,{status:t}),i),Object(d.a)("div",{className:"status-check-box-toggle"},void 0,Object(d.a)(_.a,{checked:a,onChange:n,disabled:o})))},t}(u.a.PureComponent),S=a(4),x=Object(b.connect)(function(e,t){var a=t.id;return{status:e.getIn(["statuses",a]),checked:e.getIn(["reports","new","status_ids"],Object(S.Set)()).includes(a)}},function(t,e){var a=e.id;return{onToggle:function(e){t(Object(p.m)(a,e.target.checked))}}})(N),R=a(24),F=a(178),K=a(63);a.d(t,"default",function(){return q});var T=Object(v.f)({close:{id:"lightbox.close",defaultMessage:"Close"},placeholder:{id:"report.placeholder",defaultMessage:"Additional comments"},submit:{id:"report.submit",defaultMessage:"Submit"}}),q=Object(b.connect)(function(){var a=Object(f.d)();return function(e){var t=e.getIn(["reports","new","account_id"]);return{isSubmitting:e.getIn(["reports","new","isSubmitting"]),account:a(e,t),comment:e.getIn(["reports","new","comment"]),forward:e.getIn(["reports","new","forward"]),statusIds:Object(S.OrderedSet)(e.getIn(["timelines","account:"+t+":with_replies","items"])).union(e.getIn(["reports","new","status_ids"]))}}})(n=Object(v.g)((i=o=function(o){function e(){for(var t,e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return t=o.call.apply(o,[this].concat(a))||this,Object(s.a)(Object(r.a)(Object(r.a)(t)),"handleCommentChange",function(e){t.props.dispatch(Object(p.i)(e.target.value))}),Object(s.a)(Object(r.a)(Object(r.a)(t)),"handleForwardChange",function(e){t.props.dispatch(Object(p.j)(e.target.checked))}),Object(s.a)(Object(r.a)(Object(r.a)(t)),"handleSubmit",function(){t.props.dispatch(Object(p.l)())}),Object(s.a)(Object(r.a)(Object(r.a)(t)),"handleKeyDown",function(e){13===e.keyCode&&(e.ctrlKey||e.metaKey)&&t.handleSubmit()}),t}Object(c.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){this.props.dispatch(Object(g.n)(this.props.account.get("id"),{withReplies:!0}))},t.componentWillReceiveProps=function(e){this.props.account!==e.account&&e.account&&this.props.dispatch(Object(g.n)(e.account.get("id"),{withReplies:!0}))},t.render=function(){var e=this.props,t=e.account,a=e.comment,n=e.intl,o=e.statusIds,i=e.isSubmitting,c=e.forward,r=e.onClose;if(!t)return null;var s=t.get("acct").split("@")[1];return Object(d.a)("div",{className:"modal-root__modal report-modal"},void 0,Object(d.a)("div",{className:"report-modal__target"},void 0,Object(d.a)(K.a,{className:"media-modal__close",title:n.formatMessage(T.close),icon:"times",onClick:r,size:16}),Object(d.a)(v.b,{id:"report.target",defaultMessage:"Report {target}",values:{target:Object(d.a)("strong",{},void 0,t.get("acct"))}})),Object(d.a)("div",{className:"report-modal__container"},void 0,Object(d.a)("div",{className:"report-modal__comment"},void 0,Object(d.a)("p",{},void 0,Object(d.a)(v.b,{id:"report.hint",defaultMessage:"The report will be sent to your instance moderators. You can provide an explanation of why you are reporting this account below:"})),Object(d.a)("textarea",{className:"setting-text light",placeholder:n.formatMessage(T.placeholder),value:a,onChange:this.handleCommentChange,onKeyDown:this.handleKeyDown,disabled:i,autoFocus:!0}),s&&Object(d.a)("div",{},void 0,Object(d.a)("p",{},void 0,Object(d.a)(v.b,{id:"report.forward_hint",defaultMessage:"The account is from another server. Send an anonymized copy of the report there as well?"})),Object(d.a)("div",{className:"setting-toggle"},void 0,Object(d.a)(_.a,{id:"report-forward",checked:c,disabled:i,onChange:this.handleForwardChange}),Object(d.a)("label",{htmlFor:"report-forward",className:"setting-toggle__label"},void 0,Object(d.a)(v.b,{id:"report.forward",defaultMessage:"Forward to {target}",values:{target:s}})))),Object(d.a)(F.a,{disabled:i,text:n.formatMessage(T.submit),onClick:this.handleSubmit})),Object(d.a)("div",{className:"report-modal__statuses"},void 0,Object(d.a)("div",{},void 0,o.map(function(e){return Object(d.a)(x,{id:e,disabled:i},e)})))))},e}(R.a),Object(s.a)(o,"propTypes",{isSubmitting:m.a.bool,account:j.a.map,statusIds:j.a.orderedSet.isRequired,comment:m.a.string.isRequired,forward:m.a.bool,dispatch:m.a.func.isRequired,intl:m.a.object.isRequired}),n=i))||n)||n}}]); +(window.webpackJsonp=window.webpackJsonp||[]).push([[175],{721:function(e,t,a){"use strict";a.r(t);var n,o,i,d=a(1),c=a(6),r=a(0),s=a(2),l=a(3),u=a.n(l),b=a(20),p=a(93),g=a(37),h=a(5),m=a.n(h),O=a(26),j=a.n(O),f=a(155),v=a(7),w=a(391),_=a.n(w),y=a(965),C=a.n(y),k=a(176),I=a(48),M=a(285),N=function(e){function t(){return e.apply(this,arguments)||this}return Object(c.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.status,a=e.checked,n=e.onToggle,o=e.disabled,i=null;if(t.get("reblog"))return null;if(0<t.get("media_attachments").size)if(t.get("media_attachments").some(function(e){return"unknown"===e.get("type")}));else if("video"===t.getIn(["media_attachments",0,"type"])){var c=t.getIn(["media_attachments",0]);i=Object(d.a)(M.a,{fetchComponent:I.G,loading:this.renderLoadingVideoPlayer},void 0,function(e){return Object(d.a)(e,{preview:c.get("preview_url"),src:c.get("url"),alt:c.get("description"),width:239,height:110,inline:!0,sensitive:t.get("sensitive"),onOpenVideo:C.a})})}else i=Object(d.a)(M.a,{fetchComponent:I.x,loading:this.renderLoadingMediaGallery},void 0,function(e){return Object(d.a)(e,{media:t.get("media_attachments"),sensitive:t.get("sensitive"),height:110,onOpenMedia:C.a})});return Object(d.a)("div",{className:"status-check-box"},void 0,Object(d.a)("div",{className:"status-check-box__status"},void 0,Object(d.a)(k.a,{status:t}),i),Object(d.a)("div",{className:"status-check-box-toggle"},void 0,Object(d.a)(_.a,{checked:a,onChange:n,disabled:o})))},t}(u.a.PureComponent),S=a(4),x=Object(b.connect)(function(e,t){var a=t.id;return{status:e.getIn(["statuses",a]),checked:e.getIn(["reports","new","status_ids"],Object(S.Set)()).includes(a)}},function(t,e){var a=e.id;return{onToggle:function(e){t(Object(p.m)(a,e.target.checked))}}})(N),R=a(24),F=a(181),K=a(64);a.d(t,"default",function(){return q});var T=Object(v.f)({close:{id:"lightbox.close",defaultMessage:"Close"},placeholder:{id:"report.placeholder",defaultMessage:"Additional comments"},submit:{id:"report.submit",defaultMessage:"Submit"}}),q=Object(b.connect)(function(){var a=Object(f.d)();return function(e){var t=e.getIn(["reports","new","account_id"]);return{isSubmitting:e.getIn(["reports","new","isSubmitting"]),account:a(e,t),comment:e.getIn(["reports","new","comment"]),forward:e.getIn(["reports","new","forward"]),statusIds:Object(S.OrderedSet)(e.getIn(["timelines","account:"+t+":with_replies","items"])).union(e.getIn(["reports","new","status_ids"]))}}})(n=Object(v.g)((i=o=function(o){function e(){for(var t,e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return t=o.call.apply(o,[this].concat(a))||this,Object(s.a)(Object(r.a)(Object(r.a)(t)),"handleCommentChange",function(e){t.props.dispatch(Object(p.i)(e.target.value))}),Object(s.a)(Object(r.a)(Object(r.a)(t)),"handleForwardChange",function(e){t.props.dispatch(Object(p.j)(e.target.checked))}),Object(s.a)(Object(r.a)(Object(r.a)(t)),"handleSubmit",function(){t.props.dispatch(Object(p.l)())}),Object(s.a)(Object(r.a)(Object(r.a)(t)),"handleKeyDown",function(e){13===e.keyCode&&(e.ctrlKey||e.metaKey)&&t.handleSubmit()}),t}Object(c.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){this.props.dispatch(Object(g.n)(this.props.account.get("id"),{withReplies:!0}))},t.componentWillReceiveProps=function(e){this.props.account!==e.account&&e.account&&this.props.dispatch(Object(g.n)(e.account.get("id"),{withReplies:!0}))},t.render=function(){var e=this.props,t=e.account,a=e.comment,n=e.intl,o=e.statusIds,i=e.isSubmitting,c=e.forward,r=e.onClose;if(!t)return null;var s=t.get("acct").split("@")[1];return Object(d.a)("div",{className:"modal-root__modal report-modal"},void 0,Object(d.a)("div",{className:"report-modal__target"},void 0,Object(d.a)(K.a,{className:"media-modal__close",title:n.formatMessage(T.close),icon:"times",onClick:r,size:16}),Object(d.a)(v.b,{id:"report.target",defaultMessage:"Report {target}",values:{target:Object(d.a)("strong",{},void 0,t.get("acct"))}})),Object(d.a)("div",{className:"report-modal__container"},void 0,Object(d.a)("div",{className:"report-modal__comment"},void 0,Object(d.a)("p",{},void 0,Object(d.a)(v.b,{id:"report.hint",defaultMessage:"The report will be sent to your instance moderators. You can provide an explanation of why you are reporting this account below:"})),Object(d.a)("textarea",{className:"setting-text light",placeholder:n.formatMessage(T.placeholder),value:a,onChange:this.handleCommentChange,onKeyDown:this.handleKeyDown,disabled:i,autoFocus:!0}),s&&Object(d.a)("div",{},void 0,Object(d.a)("p",{},void 0,Object(d.a)(v.b,{id:"report.forward_hint",defaultMessage:"The account is from another server. Send an anonymized copy of the report there as well?"})),Object(d.a)("div",{className:"setting-toggle"},void 0,Object(d.a)(_.a,{id:"report-forward",checked:c,disabled:i,onChange:this.handleForwardChange}),Object(d.a)("label",{htmlFor:"report-forward",className:"setting-toggle__label"},void 0,Object(d.a)(v.b,{id:"report.forward",defaultMessage:"Forward to {target}",values:{target:s}})))),Object(d.a)(F.a,{disabled:i,text:n.formatMessage(T.submit),onClick:this.handleSubmit})),Object(d.a)("div",{className:"report-modal__statuses"},void 0,Object(d.a)("div",{},void 0,o.map(function(e){return Object(d.a)(x,{id:e,disabled:i},e)})))))},e}(R.a),Object(s.a)(o,"propTypes",{isSubmitting:m.a.bool,account:j.a.map,statusIds:j.a.orderedSet.isRequired,comment:m.a.string.isRequired,forward:m.a.bool,dispatch:m.a.func.isRequired,intl:m.a.object.isRequired}),n=i))||n)||n}}]); //# sourceMappingURL=report_modal.js.map
\ No newline at end of file diff --git a/priv/static/packs/modals/report_modal.js.map b/priv/static/packs/modals/report_modal.js.map index 2d0362b27..5485e520b 100644 --- a/priv/static/packs/modals/report_modal.js.map +++ b/priv/static/packs/modals/report_modal.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/report/components/status_check_box.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/report/containers/status_check_box_container.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/ui/components/report_modal.js"],"names":["StatusCheckBox","render","_this$props","this","props","status","checked","onToggle","disabled","media","get","size","some","item","getIn","video","Object","jsx","bundle","fetchComponent","Video","loading","renderLoadingVideoPlayer","Component","preview","src","alt","width","height","inline","sensitive","onOpenVideo","noop","MediaGallery","renderLoadingMediaGallery","onOpenMedia","className","status_content","component_default","a","onChange","React","PureComponent","connect","state","_ref","id","ImmutableSet","includes","dispatch","_ref2","e","toggleStatusReport","target","messages","defineMessages","close","defaultMessage","placeholder","submit","ReportModal","getAccount","makeGetAccount","accountId","isSubmitting","account","comment","forward","statusIds","OrderedSet","union","injectIntl","_this","changeReportComment","value","changeReportForward","submitReport","keyCode","ctrlKey","metaKey","handleSubmit","componentDidMount","expandAccountTimeline","withReplies","componentWillReceiveProps","nextProps","intl","onClose","domain","split","icon_button","title","formatMessage","icon","onClick","index_es","values","handleCommentChange","onKeyDown","handleKeyDown","autoFocus","handleForwardChange","htmlFor","components_button","text","map","statusId","status_check_box_container","ImmutablePureComponent","PropTypes","bool","ImmutablePropTypes","orderedSet","isRequired","string","func","object"],"mappings":"gSASqBA,oGASnBC,OAAA,WAAU,IAAAC,EACwCC,KAAKC,MAA7CC,EADAH,EACAG,OAAQC,EADRJ,EACQI,QAASC,EADjBL,EACiBK,SAA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,IAAUO,OAAOH","file":"modals/report_modal.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Toggle from 'react-toggle';\nimport noop from 'lodash/noop';\nimport StatusContent from '../../../components/status_content';\nimport { MediaGallery, Video } from '../../ui/util/async-components';\nimport Bundle from '../../ui/components/bundle';\n\nexport default class StatusCheckBox extends React.PureComponent {\n\n static propTypes = {\n status: ImmutablePropTypes.map.isRequired,\n checked: PropTypes.bool,\n onToggle: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n };\n\n render () {\n const { status, checked, onToggle, disabled } = this.props;\n let media = null;\n\n if (status.get('reblog')) {\n return null;\n }\n\n if (status.get('media_attachments').size > 0) {\n if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {\n\n } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {\n const video = status.getIn(['media_attachments', 0]);\n\n media = (\n <Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} >\n {Component => (\n <Component\n preview={video.get('preview_url')}\n src={video.get('url')}\n alt={video.get('description')}\n width={239}\n height={110}\n inline\n sensitive={status.get('sensitive')}\n onOpenVideo={noop}\n />\n )}\n </Bundle>\n );\n } else {\n media = (\n <Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery} >\n {Component => <Component media={status.get('media_attachments')} sensitive={status.get('sensitive')} height={110} onOpenMedia={noop} />}\n </Bundle>\n );\n }\n }\n\n return (\n <div className='status-check-box'>\n <div className='status-check-box__status'>\n <StatusContent status={status} />\n {media}\n </div>\n\n <div className='status-check-box-toggle'>\n <Toggle checked={checked} onChange={onToggle} disabled={disabled} />\n </div>\n </div>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport StatusCheckBox from '../components/status_check_box';\nimport { toggleStatusReport } from '../../../actions/reports';\nimport { Set as ImmutableSet } from 'immutable';\n\nconst mapStateToProps = (state, { id }) => ({\n status: state.getIn(['statuses', id]),\n checked: state.getIn(['reports', 'new', 'status_ids'], ImmutableSet()).includes(id),\n});\n\nconst mapDispatchToProps = (dispatch, { id }) => ({\n\n onToggle (e) {\n dispatch(toggleStatusReport(id, e.target.checked));\n },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StatusCheckBox);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { changeReportComment, changeReportForward, submitReport } from '../../../actions/reports';\nimport { expandAccountTimeline } from '../../../actions/timelines';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { makeGetAccount } from '../../../selectors';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\nimport StatusCheckBox from '../../report/containers/status_check_box_container';\nimport { OrderedSet } from 'immutable';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Button from '../../../components/button';\nimport Toggle from 'react-toggle';\nimport IconButton from '../../../components/icon_button';\n\nconst messages = defineMessages({\n close: { id: 'lightbox.close', defaultMessage: 'Close' },\n placeholder: { id: 'report.placeholder', defaultMessage: 'Additional comments' },\n submit: { id: 'report.submit', defaultMessage: 'Submit' },\n});\n\nconst makeMapStateToProps = () => {\n const getAccount = makeGetAccount();\n\n const mapStateToProps = state => {\n const accountId = state.getIn(['reports', 'new', 'account_id']);\n\n return {\n isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),\n account: getAccount(state, accountId),\n comment: state.getIn(['reports', 'new', 'comment']),\n forward: state.getIn(['reports', 'new', 'forward']),\n statusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}:with_replies`, 'items'])).union(state.getIn(['reports', 'new', 'status_ids'])),\n };\n };\n\n return mapStateToProps;\n};\n\nexport default @connect(makeMapStateToProps)\n@injectIntl\nclass ReportModal extends ImmutablePureComponent {\n\n static propTypes = {\n isSubmitting: PropTypes.bool,\n account: ImmutablePropTypes.map,\n statusIds: ImmutablePropTypes.orderedSet.isRequired,\n comment: PropTypes.string.isRequired,\n forward: PropTypes.bool,\n dispatch: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n handleCommentChange = e => {\n this.props.dispatch(changeReportComment(e.target.value));\n }\n\n handleForwardChange = e => {\n this.props.dispatch(changeReportForward(e.target.checked));\n }\n\n handleSubmit = () => {\n this.props.dispatch(submitReport());\n }\n\n handleKeyDown = e => {\n if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {\n this.handleSubmit();\n }\n }\n\n componentDidMount () {\n this.props.dispatch(expandAccountTimeline(this.props.account.get('id'), { withReplies: true }));\n }\n\n componentWillReceiveProps (nextProps) {\n if (this.props.account !== nextProps.account && nextProps.account) {\n this.props.dispatch(expandAccountTimeline(nextProps.account.get('id'), { withReplies: true }));\n }\n }\n\n render () {\n const { account, comment, intl, statusIds, isSubmitting, forward, onClose } = this.props;\n\n if (!account) {\n return null;\n }\n\n const domain = account.get('acct').split('@')[1];\n\n return (\n <div className='modal-root__modal report-modal'>\n <div className='report-modal__target'>\n <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} />\n <FormattedMessage id='report.target' defaultMessage='Report {target}' values={{ target: <strong>{account.get('acct')}</strong> }} />\n </div>\n\n <div className='report-modal__container'>\n <div className='report-modal__comment'>\n <p><FormattedMessage id='report.hint' defaultMessage='The report will be sent to your instance moderators. You can provide an explanation of why you are reporting this account below:' /></p>\n\n <textarea\n className='setting-text light'\n placeholder={intl.formatMessage(messages.placeholder)}\n value={comment}\n onChange={this.handleCommentChange}\n onKeyDown={this.handleKeyDown}\n disabled={isSubmitting}\n autoFocus\n />\n\n {domain && (\n <div>\n <p><FormattedMessage id='report.forward_hint' defaultMessage='The account is from another server. Send an anonymized copy of the report there as well?' /></p>\n\n <div className='setting-toggle'>\n <Toggle id='report-forward' checked={forward} disabled={isSubmitting} onChange={this.handleForwardChange} />\n <label htmlFor='report-forward' className='setting-toggle__label'><FormattedMessage id='report.forward' defaultMessage='Forward to {target}' values={{ target: domain }} /></label>\n </div>\n </div>\n )}\n\n <Button disabled={isSubmitting} text={intl.formatMessage(messages.submit)} onClick={this.handleSubmit} />\n </div>\n\n <div className='report-modal__statuses'>\n <div>\n {statusIds.map(statusId => <StatusCheckBox id={statusId} key={statusId} disabled={isSubmitting} />)}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/report/components/status_check_box.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/report/containers/status_check_box_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/components/report_modal.js"],"names":["StatusCheckBox","render","_this$props","this","props","status","checked","onToggle","disabled","media","get","size","some","item","getIn","video","Object","jsx","bundle","fetchComponent","Video","loading","renderLoadingVideoPlayer","Component","preview","src","alt","width","height","inline","sensitive","onOpenVideo","noop","MediaGallery","renderLoadingMediaGallery","onOpenMedia","className","status_content","component_default","a","onChange","React","PureComponent","connect","state","_ref","id","ImmutableSet","includes","dispatch","_ref2","e","toggleStatusReport","target","messages","defineMessages","close","defaultMessage","placeholder","submit","ReportModal","getAccount","makeGetAccount","accountId","isSubmitting","account","comment","forward","statusIds","OrderedSet","union","injectIntl","_this","changeReportComment","value","changeReportForward","submitReport","keyCode","ctrlKey","metaKey","handleSubmit","componentDidMount","expandAccountTimeline","withReplies","componentWillReceiveProps","nextProps","intl","onClose","domain","split","icon_button","title","formatMessage","icon","onClick","index_es","values","handleCommentChange","onKeyDown","handleKeyDown","autoFocus","handleForwardChange","htmlFor","components_button","text","map","statusId","status_check_box_container","ImmutablePureComponent","PropTypes","bool","ImmutablePropTypes","orderedSet","isRequired","string","func","object"],"mappings":"gSASqBA,oGASnBC,OAAA,WAAU,IAAAC,EACwCC,KAAKC,MAA7CC,EADAH,EACAG,OAAQC,EADRJ,EACQI,QAASC,EADjBL,EACiBK,SAAUC,EAD3BN,EAC2BM,SAC/BC,EAAQ,KAEZ,GAAIJ,EAAOK,IAA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'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Toggle from 'react-toggle';\nimport noop from 'lodash/noop';\nimport StatusContent from '../../../components/status_content';\nimport { MediaGallery, Video } from '../../ui/util/async-components';\nimport Bundle from '../../ui/components/bundle';\n\nexport default class StatusCheckBox extends React.PureComponent {\n\n static propTypes = {\n status: ImmutablePropTypes.map.isRequired,\n checked: PropTypes.bool,\n onToggle: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n };\n\n render () {\n const { status, checked, onToggle, disabled } = this.props;\n let media = null;\n\n if (status.get('reblog')) {\n return null;\n }\n\n if (status.get('media_attachments').size > 0) {\n if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {\n\n } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {\n const video = status.getIn(['media_attachments', 0]);\n\n media = (\n <Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} >\n {Component => (\n <Component\n preview={video.get('preview_url')}\n src={video.get('url')}\n alt={video.get('description')}\n width={239}\n height={110}\n inline\n sensitive={status.get('sensitive')}\n onOpenVideo={noop}\n />\n )}\n </Bundle>\n );\n } else {\n media = (\n <Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery} >\n {Component => <Component media={status.get('media_attachments')} sensitive={status.get('sensitive')} height={110} onOpenMedia={noop} />}\n </Bundle>\n );\n }\n }\n\n return (\n <div className='status-check-box'>\n <div className='status-check-box__status'>\n <StatusContent status={status} />\n {media}\n </div>\n\n <div className='status-check-box-toggle'>\n <Toggle checked={checked} onChange={onToggle} disabled={disabled} />\n </div>\n </div>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport StatusCheckBox from '../components/status_check_box';\nimport { toggleStatusReport } from '../../../actions/reports';\nimport { Set as ImmutableSet } from 'immutable';\n\nconst mapStateToProps = (state, { id }) => ({\n status: state.getIn(['statuses', id]),\n checked: state.getIn(['reports', 'new', 'status_ids'], ImmutableSet()).includes(id),\n});\n\nconst mapDispatchToProps = (dispatch, { id }) => ({\n\n onToggle (e) {\n dispatch(toggleStatusReport(id, e.target.checked));\n },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StatusCheckBox);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { changeReportComment, changeReportForward, submitReport } from '../../../actions/reports';\nimport { expandAccountTimeline } from '../../../actions/timelines';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { makeGetAccount } from '../../../selectors';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\nimport StatusCheckBox from '../../report/containers/status_check_box_container';\nimport { OrderedSet } from 'immutable';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Button from '../../../components/button';\nimport Toggle from 'react-toggle';\nimport IconButton from '../../../components/icon_button';\n\nconst messages = defineMessages({\n close: { id: 'lightbox.close', defaultMessage: 'Close' },\n placeholder: { id: 'report.placeholder', defaultMessage: 'Additional comments' },\n submit: { id: 'report.submit', defaultMessage: 'Submit' },\n});\n\nconst makeMapStateToProps = () => {\n const getAccount = makeGetAccount();\n\n const mapStateToProps = state => {\n const accountId = state.getIn(['reports', 'new', 'account_id']);\n\n return {\n isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),\n account: getAccount(state, accountId),\n comment: state.getIn(['reports', 'new', 'comment']),\n forward: state.getIn(['reports', 'new', 'forward']),\n statusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}:with_replies`, 'items'])).union(state.getIn(['reports', 'new', 'status_ids'])),\n };\n };\n\n return mapStateToProps;\n};\n\nexport default @connect(makeMapStateToProps)\n@injectIntl\nclass ReportModal extends ImmutablePureComponent {\n\n static propTypes = {\n isSubmitting: PropTypes.bool,\n account: ImmutablePropTypes.map,\n statusIds: ImmutablePropTypes.orderedSet.isRequired,\n comment: PropTypes.string.isRequired,\n forward: PropTypes.bool,\n dispatch: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n handleCommentChange = e => {\n this.props.dispatch(changeReportComment(e.target.value));\n }\n\n handleForwardChange = e => {\n this.props.dispatch(changeReportForward(e.target.checked));\n }\n\n handleSubmit = () => {\n this.props.dispatch(submitReport());\n }\n\n handleKeyDown = e => {\n if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {\n this.handleSubmit();\n }\n }\n\n componentDidMount () {\n this.props.dispatch(expandAccountTimeline(this.props.account.get('id'), { withReplies: true }));\n }\n\n componentWillReceiveProps (nextProps) {\n if (this.props.account !== nextProps.account && nextProps.account) {\n this.props.dispatch(expandAccountTimeline(nextProps.account.get('id'), { withReplies: true }));\n }\n }\n\n render () {\n const { account, comment, intl, statusIds, isSubmitting, forward, onClose } = this.props;\n\n if (!account) {\n return null;\n }\n\n const domain = account.get('acct').split('@')[1];\n\n return (\n <div className='modal-root__modal report-modal'>\n <div className='report-modal__target'>\n <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} />\n <FormattedMessage id='report.target' defaultMessage='Report {target}' values={{ target: <strong>{account.get('acct')}</strong> }} />\n </div>\n\n <div className='report-modal__container'>\n <div className='report-modal__comment'>\n <p><FormattedMessage id='report.hint' defaultMessage='The report will be sent to your instance moderators. You can provide an explanation of why you are reporting this account below:' /></p>\n\n <textarea\n className='setting-text light'\n placeholder={intl.formatMessage(messages.placeholder)}\n value={comment}\n onChange={this.handleCommentChange}\n onKeyDown={this.handleKeyDown}\n disabled={isSubmitting}\n autoFocus\n />\n\n {domain && (\n <div>\n <p><FormattedMessage id='report.forward_hint' defaultMessage='The account is from another server. Send an anonymized copy of the report there as well?' /></p>\n\n <div className='setting-toggle'>\n <Toggle id='report-forward' checked={forward} disabled={isSubmitting} onChange={this.handleForwardChange} />\n <label htmlFor='report-forward' className='setting-toggle__label'><FormattedMessage id='report.forward' defaultMessage='Forward to {target}' values={{ target: domain }} /></label>\n </div>\n </div>\n )}\n\n <Button disabled={isSubmitting} text={intl.formatMessage(messages.submit)} onClick={this.handleSubmit} />\n </div>\n\n <div className='report-modal__statuses'>\n <div>\n {statusIds.map(statusId => <StatusCheckBox id={statusId} key={statusId} disabled={isSubmitting} />)}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file |