2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
|
webpackJsonp([18],{825:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return X});var a,o,i,r,s=n(2),c=n.n(s),l=n(1),d=n.n(l),u=n(3),h=n.n(u),f=n(4),p=n.n(f),v=n(0),g=(n.n(v),n(9)),m=n(151),b=n(19),k=n(5),y=n.n(k),_=n(13),w=n.n(_),C=n(66),O=n(6),j=n(972),M=n(8),T=(n.n(M),n(12)),S=n.n(T),x=n(99),E=n(856),N=n.n(E),P=n(23),I=Object(O.f)({close:{id:"lightbox.close",defaultMessage:"Close"},placeholder:{id:"report.placeholder",defaultMessage:"Additional comments"},submit:{id:"report.submit",defaultMessage:"Submit"}}),F=function(){var e=Object(C.c)();return function(t){var n=t.getIn(["reports","new","account_id"]);return{isSubmitting:t.getIn(["reports","new","isSubmitting"]),account:e(t,n),comment:t.getIn(["reports","new","comment"]),forward:t.getIn(["reports","new","forward"]),statusIds:Object(M.OrderedSet)(t.getIn(["timelines","account:"+n,"items"])).union(t.getIn(["reports","new","status_ids"]))}}},X=(a=Object(g.connect)(F))(o=Object(O.g)((r=i=function(e){function t(){var n,a,o;d()(this,t);for(var i=arguments.length,r=Array(i),s=0;s<i;s++)r[s]=arguments[s];return n=a=h()(this,e.call.apply(e,[this].concat(r))),a.handleCommentChange=function(e){a.props.dispatch(Object(m.i)(e.target.value))},a.handleForwardChange=function(e){a.props.dispatch(Object(m.j)(e.target.checked))},a.handleSubmit=function(){a.props.dispatch(Object(m.l)())},o=n,h()(a,o)}return p()(t,e),t.prototype.componentDidMount=function(){this.props.dispatch(Object(b.l)(this.props.account.get("id")))},t.prototype.componentWillReceiveProps=function(e){this.props.account!==e.account&&e.account&&this.props.dispatch(Object(b.l)(e.account.get("id")))},t.prototype.render=function(){var e=this.props,t=e.account,n=e.comment,a=e.intl,o=e.statusIds,i=e.isSubmitting,r=e.forward,s=e.onClose;if(!t)return null;var l=t.get("acct").split("@")[1];return c()("div",{className:"modal-root__modal report-modal"},void 0,c()("div",{className:"report-modal__target"},void 0,c()(P.a,{className:"media-modal__close",title:a.formatMessage(I.close),icon:"times",onClick:s,size:16}),c()(O.b,{id:"report.target",defaultMessage:"Report {target}",values:{target:c()("strong",{},void 0,t.get("acct"))}})),c()("div",{className:"report-modal__container"},void 0,c()("div",{className:"report-modal__comment"},void 0,c()("p",{},void 0,c()(O.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:"})),c()("textarea",{className:"setting-text light",placeholder:a.formatMessage(I.placeholder),value:n,onChange:this.handleCommentChange,disabled:i}),l&&c()("div",{},void 0,c()("p",{},void 0,c()(O.b,{id:"report.forward_hint",defaultMessage:"The account is from another server. Send an anonymized copy of the report there as well?"})),c()("div",{className:"setting-toggle"},void 0,c()(N.a,{id:"report-forward",checked:r,disabled:i,onChange:this.handleForwardChange}),c()("label",{htmlFor:"report-forward",className:"setting-toggle__label"},void 0,c()(O.b,{id:"report.forward",defaultMessage:"Forward to {target}",values:{target:l}})))),c()(x.a,{disabled:i,text:a.formatMessage(I.submit),onClick:this.handleSubmit})),c()("div",{className:"report-modal__statuses"},void 0,c()("div",{},void 0,o.map(function(e){return c()(j.a,{id:e,disabled:i},e)})))))},t}(S.a),i.propTypes={isSubmitting:y.a.bool,account:w.a.map,statusIds:w.a.orderedSet.isRequired,comment:y.a.string.isRequired,forward:y.a.bool,dispatch:y.a.func.isRequired,intl:y.a.object.isRequired},o=r))||o)||o},856:function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new
|
||
|
//# sourceMappingURL=report_modal.js.map
|