pleroma/priv/static/packs/features/domain_blocks.js

2 lines
3.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{711:function(n,e,o){"use strict";o.r(e);var a,t,i,c,r,s,d=o(0),l=o(2),u=o(6),m=o(1),b=o(56),f=o.n(b),p=(o(3),o(21)),j=o(7),O=o(25),h=o(5),g=o.n(h),k=o(26),v=o.n(k),M=o(272),y=o(626),_=o(634),w=o(187),D=o(67),U=Object(j.f)({unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),R=Object(j.g)((i=t=function(t){function n(){for(var n,e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o))||this,Object(m.a)(Object(l.a)(n),"handleDomainUnblock",function(){n.props.onUnblockDomain(n.props.domain)}),n}return Object(u.a)(n,t),n.prototype.render=function(){var n=this.props,e=n.domain,o=n.intl;return Object(d.a)("div",{className:"domain"},void 0,Object(d.a)("div",{className:"domain__wrapper"},void 0,Object(d.a)("span",{className:"domain__domain-name"},void 0,Object(d.a)("strong",{},void 0,e)),Object(d.a)("div",{className:"domain__buttons"},void 0,Object(d.a)(D.a,{active:!0,icon:"unlock",title:o.formatMessage(U.unblockDomain,{domain:e}),onClick:this.handleDomainUnblock}))))},n}(O.a),Object(m.a)(t,"propTypes",{domain:g.a.string,onUnblockDomain:g.a.func.isRequired,intl:g.a.object.isRequired}),a=i))||a,q=o(57),C=Object(j.f)({blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"}}),N=Object(j.g)(Object(p.connect)(function(){return function(){return{}}},function(e,n){var o=n.intl;return{onBlockDomain:function(n){e(Object(q.d)("CONFIRM",{message:Object(d.a)(j.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(d.a)("strong",{},void 0,n)}}),confirm:o.formatMessage(C.blockDomainConfirm),onConfirm:function(){return e(Object(w.e)(n))}}))},onUnblockDomain:function(n){e(Object(w.h)(n))}}})(R)),I=o(893);o.d(e,"default",function(){return A});var S=Object(j.f)({heading:{id:"column.domain_blocks",defaultMessage:"Hidden domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),A=Object(p.connect)(function(n){return{domains:n.getIn(["domain_lists","blocks","items"]),hasMore:!!n.getIn(["domain_lists","blocks","next"])}})(c=Object(j.g)((s=r=function(t){function n(){for(var n,e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o))||this,Object(m.a)(Object(l.a)(n),"handleLoadMore",f()(function(){n.props.dispatch(Object(w.f)())},300,{leading:!0})),n}Object(u.a)(n,t);var e=n.prototype;return e.componentWillMount=function(){this.props.dispatch(Object(w.g)())},e.render=function(){var n=this.props,e=n.intl,o=n.domains,a=n.shouldUpdateScroll,t=n.hasMore;if(!o)return Object(d.a)(y.a,{},void 0,Object(d.a)(M.a,{}));var i=Object(d.a)(j.b,{id:"empty_column.domain_blocks",defaultMessage:"There are no hidden domains yet."});return Object(d.a)(y.a,{icon:"minus-circle",heading:e.formatMessage(S.heading)},void 0,Object(d.a)(_.a,{}),Object(d.a)(I.a,{scrollKey:"domain_blocks",onLoadMore:this.handleLoadMore,hasMore:t,shouldUpdateScroll:a,emptyMessage:i},void 0,o.map(function(n){return Object(d.a)(N,{domain:n},n)})))},n}(O.a),Object(m.a)(r,"propTypes",{params:g.a.object.isRequired,dispatch:g.a.func.isRequired,shouldUpdateScroll:g.a.func,hasMore:g.a.bool,domains:v.a.orderedSet,intl:g.a.object.isRequired}),c=s))||c)||c}}]);
//# sourceMappingURL=domain_blocks.js.map