pleroma/priv/static/packs/flavours/glitch/async/domain_blocks.js
2020-01-22 16:00:23 +01:00

2 lines
3.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{745:function(n,e,a){"use strict";a.r(e);var o=a(0),t=a(2),i=a(7),c=a(1),r=a(63),s=a.n(r),d=(a(3),a(12)),l=a(18),u=a.n(l),m=a(5),b=a.n(m),f=a(293),p=a(662),j=a(668);var O,h,g,k,v,M,y=a(80),_=a(6),w=a(40),D=a(19),U=Object(_.f)({unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),C=Object(_.g)((g=h=function(n){function e(){for(var e,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return e=n.call.apply(n,[this].concat(o))||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,a=n.intl;return Object(o.a)("div",{className:"domain"},void 0,Object(o.a)("div",{className:"domain__wrapper"},void 0,Object(o.a)("span",{className:"domain__domain-name"},void 0,Object(o.a)("strong",{},void 0,e)),Object(o.a)("div",{className:"domain__buttons"},void 0,Object(o.a)(w.a,{active:!0,icon:"unlock",title:a.formatMessage(U.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=a(42),q=Object(_.f)({blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"}}),N=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 a=e.intl;return{onBlockDomain:function(e){n(Object(R.d)("CONFIRM",{message:Object(o.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(o.a)("strong",{},void 0,e)}}),confirm:a.formatMessage(q.blockDomainConfirm),onConfirm:function(){return n(Object(y.e)(e))}}))},onUnblockDomain:function(e){n(Object(y.h)(e))}}})(C)),I=a(963);a.d(e,"default",function(){return A});var T=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,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return e=n.call.apply(n,[this].concat(o))||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 a=e.prototype;return a.componentWillMount=function(){this.props.dispatch(Object(y.g)())},a.render=function(){var n=this.props,e=n.intl,a=n.domains,t=n.hasMore;if(!a)return Object(o.a)(p.a,{},void 0,Object(o.a)(f.a,{}));var i=Object(o.a)(_.b,{id:"empty_column.domain_blocks",defaultMessage:"There are no hidden domains yet."});return Object(o.a)(p.a,{icon:"minus-circle",heading:e.formatMessage(T.heading)},void 0,Object(o.a)(j.a,{}),Object(o.a)(I.a,{scrollKey:"domain_blocks",onLoadMore:this.handleLoadMore,hasMore:t,emptyMessage:i},void 0,a.map(function(n){return Object(o.a)(N,{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:u.a.list,intl:b.a.object.isRequired}),k=M))||k)||k}}]);
//# sourceMappingURL=domain_blocks.js.map