2019-02-10 11:55:22 -07:00
|
|
|
(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,
|