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

2 lines
3.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{720:function(n,e,a){"use strict";a.r(e);var o,t,i,c,r,s,d=a(1),l=a(7),u=a(0),b=a(2),m=a(54),f=a.n(m),p=(a(3),a(20)),j=a(6),O=a(24),h=a(5),g=a.n(h),k=a(26),v=a.n(k),M=a(291),y=a(642),_=a(646),w=a(165),D=a(66),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,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,Object(b.a)(Object(u.a)(Object(u.a)(n)),"handleDomainUnblock",function(){n.props.onUnblockDomain(n.props.domain)}),n}return Object(l.a)(n,t),n.prototype.render=function(){var n=this.props,e=n.domain,a=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:a.formatMessage(U.unblockDomain,{domain:e}),onClick:this.handleDomainUnblock}))))},n}(O.a),Object(b.a)(t,"propTypes",{domain:g.a.string,onUnblockDomain:g.a.func.isRequired,intl:g.a.object.isRequired}),o=i))||o,q=a(50),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 a=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:a.formatMessage(C.blockDomainConfirm),onConfirm:function(){return e(Object(w.e)(n))}}))},onUnblockDomain:function(n){e(Object(w.h)(n))}}})(R)),I=a(643);a.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,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,Object(b.a)(Object(u.a)(Object(u.a)(n)),"handleLoadMore",f()(function(){n.props.dispatch(Object(w.f)())},300,{leading:!0})),n}Object(l.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,a=n.domains,o=n.shouldUpdateScroll,t=n.hasMore;if(!a)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:o,emptyMessage:i},void 0,a.map(function(n){return Object(d.a)(N,{domain:n},n)})))},n}(O.a),Object(b.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