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

2 lines
3.4 KiB
JavaScript
Raw Normal View History

2018-09-16 21:17:34 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{720:function(n,e,a){"use strict";a.r(e);var o,t,i,c,r,d,s=a(1),l=a(6),u=a(0),b=a(2),m=a(53),f=a.n(m),p=(a(3),a(20)),j=a(7),O=a(24),h=a(5),g=a.n(h),k=a(26),v=a.n(k),y=a(289),M=a(640),_=a(644),w=a(161),D=a(63),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(s.a)("div",{className:"domain"},void 0,Object(s.a)("div",{className:"domain__wrapper"},void 0,Object(s.a)("span",{className:"domain__domain-name"},void 0,Object(s.a)("strong",{},void 0,e)),Object(s.a)("div",{className:"domain__buttons"},void 0,Object(s.a)(D.a,{active:!0,icon:"unlock-alt",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(49),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(s.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(s.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)),S=a(641);a.d(e,"default",function(){return I});var A=Object(j.f)({heading:{id:"column.domain_blocks",defaultMessage:"Hidden domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),I=Object(p.connect)(function(n){return{domains:n.getIn(["domain_lists","blocks","items"])}})(c=Object(j.g)((d=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;if(!a)return Object(s.a)(M.a,{},void 0,Object(s.a)(y.a,{}));var t=Object(s.a)(j.b,{id:"empty_column.domain_blocks",defaultMessage:"There are no hidden domains yet."});return Object(s.a)(M.a,{icon:"minus-circle",heading:e.formatMessage(A.heading)},void 0,Object(s.a)(_.a,{}),Object(s.a)(S.a,{scrollKey:"domain_blocks",onLoadMore:this.handleLoadMore,shouldUpdateScroll:o,emptyMessage:t},void 0,a.map(function(n){return Object(s.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,domains:v.a.orderedSet,intl:g.a.object.isRequired}),c=d))||c)||c}}]);
2018-08-12 13:29:30 +00:00
//# sourceMappingURL=domain_blocks.js.map