pleroma/priv/static/packs/modals/report_modal-7a2950f40d4867...

2 lines
9.6 KiB
JavaScript
Raw Normal View History

2017-11-12 13:23:05 +00:00
webpackJsonp([17],{773:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return P});var a,c,o,i,r=n(2),s=n.n(r),u=n(1),l=n.n(u),d=n(3),h=n.n(d),f=n(4),p=n.n(f),v=n(0),m=(n.n(v),n(9)),g=n(151),b=n(16),k=n(5),y=n.n(k),_=n(12),O=n.n(_),C=n(69),j=n(6),w=n(901),S=n(8),T=(n.n(S),n(11)),E=n.n(T),M=n(101),N=Object(j.f)({placeholder:{id:"report.placeholder",defaultMessage:"Additional comments"},submit:{id:"report.submit",defaultMessage:"Submit"}}),x=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"]),statusIds:Object(S.OrderedSet)(t.getIn(["timelines","account:"+n,"items"])).union(t.getIn(["reports","new","status_ids"]))}}},P=(a=Object(m.connect)(x))(c=Object(j.g)((i=o=function(e){function t(){var n,a,c;l()(this,t);for(var o=arguments.length,i=Array(o),r=0;r<o;r++)i[r]=arguments[r];return n=a=h()(this,e.call.apply(e,[this].concat(i))),a.handleCommentChange=function(e){a.props.dispatch(Object(g.h)(e.target.value))},a.handleSubmit=function(){a.props.dispatch(Object(g.j)())},c=n,h()(a,c)}return p()(t,e),t.prototype.componentDidMount=function(){this.props.dispatch(Object(b.w)(this.props.account.get("id")))},t.prototype.componentWillReceiveProps=function(e){this.props.account!==e.account&&e.account&&this.props.dispatch(Object(b.w)(e.account.get("id")))},t.prototype.render=function(){var e=this.props,t=e.account,n=e.comment,a=e.intl,c=e.statusIds,o=e.isSubmitting;return t?s()("div",{className:"modal-root__modal report-modal"},void 0,s()("div",{className:"report-modal__target"},void 0,s()(j.b,{id:"report.target",defaultMessage:"Report {target}",values:{target:s()("strong",{},void 0,t.get("acct"))}})),s()("div",{className:"report-modal__container"},void 0,s()("div",{className:"report-modal__statuses"},void 0,s()("div",{},void 0,c.map(function(e){return s()(w.a,{id:e,disabled:o},e)}))),s()("div",{className:"report-modal__comment"},void 0,s()("textarea",{className:"setting-text light",placeholder:a.formatMessage(N.placeholder),value:n,onChange:this.handleCommentChange,disabled:o}))),s()("div",{className:"report-modal__action-bar"},void 0,s()(M.a,{disabled:o,text:a.formatMessage(N.submit),onClick:this.handleSubmit}))):null},t}(E.a),o.propTypes={isSubmitting:y.a.bool,account:O.a.map,statusIds:O.a.orderedSet.isRequired,comment:y.a.string.isRequired,dispatch:y.a.func.isRequired,intl:y.a.object.isRequired},c=i))||c)||c},790:function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function c(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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),l=n(0),d=a(l),h=n(10),f=a(h),p=n(5),v=a(p),m=n(791),g=a(m),b=n(792),k=a(b),y=n(793),_=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleClick=n.handleClick.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchMove=n
//# sourceMappingURL=report_modal-7a2950f40d4867b9cbb0.js.map