X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Fmodals%2Freport_modal.js;h=cc6d7904fb20b3d8b5c38f4d55776ffe0312a62a;hb=c2dd4639d675df8cff944956677acbd872224acb;hp=78eca1b1a007d619d4ea3c8aab0a2ad3f9cc1e56;hpb=9908cf8fda7d47f23456033cd8c77126d14c81ab;p=akkoma diff --git a/priv/static/packs/modals/report_modal.js b/priv/static/packs/modals/report_modal.js index 78eca1b1a..cc6d7904f 100644 --- a/priv/static/packs/modals/report_modal.js +++ b/priv/static/packs/modals/report_modal.js @@ -1,2 +1,2 @@ -webpackJsonp([21],{1007:function(e,t,n){"use strict";var a=n(9),o=n(1008),i=n(157),r=n(8),s=(n.n(r),function(e,t){var n=t.id;return{status:e.getIn(["statuses",n]),checked:e.getIn(["reports","new","status_ids"],Object(r.Set)()).includes(n)}}),c=function(e,t){var n=t.id;return{onToggle:function(t){e(Object(i.m)(n,t.target.checked))}}};t.a=Object(a.connect)(s,c)(o.a)},1008:function(e,t,n){"use strict";n.d(t,"a",function(){return y});var a=n(2),o=n.n(a),i=n(1),r=n.n(i),s=n(3),c=n.n(s),l=n(4),d=n.n(l),u=n(0),h=n.n(u),f=n(867),p=n.n(f),v=n(1009),g=n.n(v),m=n(104),b=n(58),k=n(165),y=function(e){function t(){return r()(this,t),c()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.status,n=e.checked,a=e.onToggle,i=e.disabled,r=null;if(t.get("reblog"))return null;if(t.get("media_attachments").size>0)if(t.get("media_attachments").some(function(e){return"unknown"===e.get("type")}));else if("video"===t.getIn(["media_attachments",0,"type"])){var s=t.getIn(["media_attachments",0]);r=o()(k.a,{fetchComponent:b.G,loading:this.renderLoadingVideoPlayer},void 0,function(e){return o()(e,{preview:s.get("preview_url"),src:s.get("url"),width:239,height:110,inline:!0,sensitive:t.get("sensitive"),onOpenVideo:g.a})})}else r=o()(k.a,{fetchComponent:b.w,loading:this.renderLoadingMediaGallery},void 0,function(e){return o()(e,{media:t.get("media_attachments"),sensitive:t.get("sensitive"),height:110,onOpenMedia:g.a})});return o()("div",{className:"status-check-box"},void 0,o()("div",{className:"status-check-box__status"},void 0,o()(m.a,{status:t}),r),o()("div",{className:"status-check-box-toggle"},void 0,o()(p.a,{checked:n,onChange:a,disabled:i})))},t}(h.a.PureComponent)},1009:function(e,t){function n(){}e.exports=n},836: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(157),b=n(19),k=n(5),y=n.n(k),_=n(14),w=n.n(_),C=n(67),O=n(7),j=n(1007),M=n(8),S=(n.n(M),n(12)),T=n.n(S),x=n(100),E=n(867),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+":with_replies","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=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 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 c=Object.assign||function(e){for(var t=1;tthis.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=tn?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-40){var n=t[0];return{x:n.clientX,y:n.clientY}}var a=e.pageX;if(void 0!==a)return{x:a,y:e.pageY}}return{x:0,y:0}}Object.defineProperty(t,"__esModule",{value:!0}),t.pointerCoord=a}}); +(window.webpackJsonp=window.webpackJsonp||[]).push([[243],{853:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return T}));var n=a(0),o=a(2),i=(a(9),a(6),a(8)),r=a(1),s=a(3),c=a.n(s),d=a(15),l=a(105),u=a(36),b=a(5),p=a.n(b),h=a(16),g=a.n(h),m=a(210),v=a(7),O=a(307),j=a.n(O),f=a(1154),w=a.n(f),_=a(234),y=a(42),C=a(318);var k,M,I,N=function(e){Object(i.a)(a,e);var t;t=a;function a(){return e.apply(this,arguments)||this}return a.prototype.render=function(){var e=this.props,t=e.status,a=e.checked,o=e.onToggle,i=e.disabled,r=null;if(t.get("reblog"))return null;if(t.get("media_attachments").size>0)if(t.get("media_attachments").some((function(e){return"unknown"===e.get("type")})));else if("video"===t.getIn(["media_attachments",0,"type"])){var s=t.getIn(["media_attachments",0]);r=Object(n.a)(C.a,{fetchComponent:y.M,loading:this.renderLoadingVideoPlayer},void 0,(function(e){return Object(n.a)(e,{preview:s.get("preview_url"),blurhash:s.get("blurhash"),src:s.get("url"),alt:s.get("description"),width:239,height:110,inline:!0,sensitive:t.get("sensitive"),onOpenVideo:w.a})}))}else r=Object(n.a)(C.a,{fetchComponent:y.B,loading:this.renderLoadingMediaGallery},void 0,(function(e){return Object(n.a)(e,{media:t.get("media_attachments"),sensitive:t.get("sensitive"),height:110,onOpenMedia:w.a})}));return(Object(n.a)("div",{className:"status-check-box"},void 0,Object(n.a)("div",{className:"status-check-box__status"},void 0,Object(n.a)(_.a,{status:t}),r),Object(n.a)("div",{className:"status-check-box-toggle"},void 0,Object(n.a)(j.a,{checked:a,onChange:o,disabled:i}))))},a}(c.a.PureComponent),S=a(4),x=Object(d.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(e,t){var a=t.id;return{onToggle:function(t){e(Object(l.m)(a,t.target.checked))}}}))(N),R=a(21),q=a(110),F=a(53);var K=Object(v.f)({close:{id:"lightbox.close",defaultMessage:"Close"},placeholder:{id:"report.placeholder",defaultMessage:"Additional comments"},submit:{id:"report.submit",defaultMessage:"Submit"}}),T=Object(d.connect)((function(){var e=Object(m.d)();return function(t){var a=t.getIn(["reports","new","account_id"]);return{isSubmitting:t.getIn(["reports","new","isSubmitting"]),account:e(t,a),comment:t.getIn(["reports","new","comment"]),forward:t.getIn(["reports","new","forward"]),statusIds:Object(S.OrderedSet)(t.getIn(["timelines","account:"+a+":with_replies","items"])).union(t.getIn(["reports","new","status_ids"]))}}}))(k=Object(v.g)((I=M=function(e){Object(i.a)(a,e);var t;t=a;function a(){for(var t,a=arguments.length,n=new Array(a),i=0;i