pleroma/priv/static/packs/flavours/glitch/async/domain_blocks.js
2020-05-20 07:55:14 +02:00

2 lines
3.6 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{841:function(n,o,e){"use strict";e.r(o),e.d(o,"default",(function(){return A}));var a=e(0),t=e(2),i=(e(9),e(6),e(8)),c=e(1),r=e(65),s=e.n(r),d=(e(3),e(15)),l=e(16),u=e.n(l),m=e(5),b=e.n(m),f=e(305),p=e(756),j=e(761);var O,k,h,g=e(85),v=e(7),M=e(41),y=e(21);var _,w,D,C=Object(v.f)({unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unblock domain {domain}"}}),U=Object(v.g)((h=k=function(n){Object(i.a)(e,n);var o;o=e;function e(){for(var o,e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return o=n.call.apply(n,[this].concat(a))||this,Object(c.a)(Object(t.a)(o),"handleDomainUnblock",(function(){o.props.onUnblockDomain(o.props.domain)})),o}return e.prototype.render=function(){var n=this.props,o=n.domain,e=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,o)),Object(a.a)("div",{className:"domain__buttons"},void 0,Object(a.a)(M.a,{active:!0,icon:"unlock",title:e.formatMessage(C.unblockDomain,{domain:o}),onClick:this.handleDomainUnblock})))))},e}(y.a),Object(c.a)(k,"propTypes",{domain:b.a.string,onUnblockDomain:b.a.func.isRequired,intl:b.a.object.isRequired}),O=h))||O,R=e(45),T=Object(v.f)({blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Block entire domain"}}),q=Object(v.g)(Object(d.connect)((function(){return function(n,o){return function(n){if(null==n)throw new TypeError("Cannot destructure undefined")}(o),{}}}),(function(n,o){var e=o.intl;return{onBlockDomain:function(o){n(Object(R.d)("CONFIRM",{message:Object(a.a)(v.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,o)}}),confirm:e.formatMessage(T.blockDomainConfirm),onConfirm:function(){return n(Object(g.e)(o))}}))},onUnblockDomain:function(o){n(Object(g.h)(o))}}}))(U)),N=e(1048);var I=Object(v.f)({heading:{id:"column.domain_blocks",defaultMessage:"Blocked domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unblock domain {domain}"}}),A=Object(d.connect)((function(n){return{domains:n.getIn(["domain_lists","blocks","items"]),hasMore:!!n.getIn(["domain_lists","blocks","next"])}}))(_=Object(v.g)((D=w=function(n){Object(i.a)(e,n);var o;o=e;function e(){for(var o,e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return o=n.call.apply(n,[this].concat(a))||this,Object(c.a)(Object(t.a)(o),"handleLoadMore",s()((function(){o.props.dispatch(Object(g.f)())}),300,{leading:!0})),o}var r=e.prototype;return r.componentWillMount=function(){this.props.dispatch(Object(g.g)())},r.render=function(){var n=this.props,o=n.intl,e=n.domains,t=n.hasMore,i=n.multiColumn;if(!e)return Object(a.a)(p.a,{},void 0,Object(a.a)(f.a,{}));var c=Object(a.a)(v.b,{id:"empty_column.domain_blocks",defaultMessage:"There are no blocked domains yet."});return(Object(a.a)(p.a,{bindToDocument:!i,icon:"minus-circle",heading:o.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,e.map((function(n){return Object(a.a)(q,{domain:n},n)})))))},e}(y.a),Object(c.a)(w,"propTypes",{params:b.a.object.isRequired,dispatch:b.a.func.isRequired,hasMore:b.a.bool,domains:u.a.list,intl:b.a.object.isRequired,multiColumn:b.a.bool}),_=D))||_)||_}}]);
//# sourceMappingURL=domain_blocks.js.map