pleroma/priv/static/packs/flavours/glitch/async/domain_blocks.js

2 lines
3.5 KiB
JavaScript
Raw Normal View History

2020-02-29 00:41:13 -05:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{814:function(n,e,o){"use strict";o.r(e);var a=o(0),t=o(2),i=o(7),c=o(1),r=o(62),s=o.n(r),d=(o(3),o(13)),u=o(14),l=o.n(u),m=o(5),b=o.n(m),f=o(299),p=o(730),j=o(735);var O,h,g,k,v,M,y=o(81),_=o(6),w=o(39),D=o(18),C=Object(_.f)({unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),U=Object(_.g)((g=h=function(n){function e(){for(var e,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a))||this,Object(c.a)(Object(t.a)(e),"handleDomainUnblock",(function(){e.props.onUnblockDomain(e.props.domain)})),e}return Object(i.a)(e,n),e.prototype.render=function(){var n=this.props,e=n.domain,o=n.intl;return Object(a.a)("div",{className:"domain"},void 0,Object(a.a)("div",{className:"domain__wrapper"},void 0,Object(a.a)("span",{className:"domain__domain-name"},void 0,Object(a.a)("strong",{},void 0,e)),Object(a.a)("div",{className:"domain__buttons"},void 0,Object(a.a)(w.a,{active:!0,icon:"unlock",title:o.formatMessage(C.unblockDomain,{domain:e}),onClick:this.handleDomainUnblock}))))},e}(D.a),Object(c.a)(h,"propTypes",{domain:b.a.string,onUnblockDomain:b.a.func.isRequired,intl:b.a.object.isRequired}),O=g))||O,R=o(42),T=Object(_.f)({blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"}}),q=Object(_.g)(Object(d.connect)((function(){return function(n,e){return function(n){if(null==n)throw new TypeError("Cannot destructure undefined")}(e),{}}}),(function(n,e){var o=e.intl;return{onBlockDomain:function(e){n(Object(R.d)("CONFIRM",{message:Object(a.a)(_.b,{id:"confirmations.domain_block.message",defaultMessage:"Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",values:{domain:Object(a.a)("strong",{},void 0,e)}}),confirm:o.formatMessage(T.blockDomainConfirm),onConfirm:function(){return n(Object(y.e)(e))}}))},onUnblockDomain:function(e){n(Object(y.h)(e))}}}))(U)),N=o(1022);o.d(e,"default",(function(){return A}));var I=Object(_.f)({heading:{id:"column.domain_blocks",defaultMessage:"Hidden domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),A=Object(d.connect)((function(n){return{domains:n.getIn(["domain_lists","blocks","items"]),hasMore:!!n.getIn(["domain_lists","blocks","next"])}}))(k=Object(_.g)((M=v=function(n){function e(){for(var e,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return e=n.call.apply(n,[this].concat(a))||this,Object(c.a)(Object(t.a)(e),"handleLoadMore",s()((function(){e.props.dispatch(Object(y.f)())}),300,{leading:!0})),e}Object(i.a)(e,n);var o=e.prototype;return o.componentWillMount=function(){this.props.dispatch(Object(y.g)())},o.render=function(){var n=this.props,e=n.intl,o=n.domains,t=n.hasMore,i=n.multiColumn;if(!o)return Object(a.a)(p.a,{},void 0,Object(a.a)(f.a,{}));var c=Object(a.a)(_.b,{id:"empty_column.domain_blocks",defaultMessage:"There are no hidden domains yet."});return Object(a.a)(p.a,{bindToDocument:!i,icon:"minus-circle",heading:e.formatMessage(I.heading)},void 0,Object(a.a)(j.a,{}),Object(a.a)(N.a,{scrollKey:"domain_blocks",onLoadMore:this.handleLoadMore,hasMore:t,emptyMessage:c,bindToDocument:!i},void 0,o.map((function(n){return Object(a.a)(q,{domain:n},n)}))))},e}(D.a),Object(c.a)(v,"propTypes",{params:b.a.object.isRequired,dispatch:b.a.func.isRequired,hasMore:b.a.bool,domains:l.a.list,intl:b.a.object.isRequired,multiColumn:b.a.bool}),k=M))||k)||k}}]);
2018-09-16 17:17:34 -04:00
//# sourceMappingURL=domain_blocks.js.map