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

2 lines
3.5 KiB
JavaScript
Raw Normal View History

2020-02-29 05:41:13 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{826:function(n,e,o){"use strict";o.r(e);var a,t,i,c,r,s,d=o(0),l=o(2),u=o(7),m=o(1),b=o(62),f=o.n(b),p=(o(3),o(13)),j=o(6),O=o(18),h=o(5),g=o.n(h),k=o(14),v=o.n(k),M=o(300),y=o(731),_=o(737),D=o(80),w=o(50),U=Object(j.f)({unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),C=Object(j.g)((i=t=function(n){function e(){for(var e,o=arguments.length,a=new Array(o),t=0;t<o;t++)a[t]=arguments[t];return e=n.call.apply(n,[this].concat(a))||this,Object(m.a)(Object(l.a)(e),"handleDomainUnblock",(function(){e.props.onUnblockDomain(e.props.domain)})),e}return Object(u.a)(e,n),e.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)(w.a,{active:!0,icon:"unlock",title:o.formatMessage(U.unblockDomain,{domain:e}),onClick:this.handleDomainUnblock}))))},e}(O.a),Object(m.a)(t,"propTypes",{domain:g.a.string,onUnblockDomain:g.a.func.isRequired,intl:g.a.object.isRequired}),a=i))||a,R=o(47),q=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(n,e){var o=e.intl;return{onBlockDomain:function(e){n(Object(R.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,e)}}),confirm:o.formatMessage(q.blockDomainConfirm),onConfirm:function(){return n(Object(D.e)(e))}}))},onUnblockDomain:function(e){n(Object(D.h)(e))}}}))(C)),T=o(1023);o.d(e,"default",(function(){return S}));var I=Object(j.f)({heading:{id:"column.domain_blocks",defaultMessage:"Hidden domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),S=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(n){function e(){for(var e,o=arguments.length,a=new Array(o),t=0;t<o;t++)a[t]=arguments[t];return e=n.call.apply(n,[this].concat(a))||this,Object(m.a)(Object(l.a)(e),"handleLoadMore",f()((function(){e.props.dispatch(Object(D.f)())}),300,{leading:!0})),e}Object(u.a)(e,n);var o=e.prototype;return o.componentWillMount=function(){this.props.dispatch(Object(D.g)())},o.render=function(){var n=this.props,e=n.intl,o=n.domains,a=n.shouldUpdateScroll,t=n.hasMore,i=n.multiColumn;if(!o)return Object(d.a)(y.a,{},void 0,Object(d.a)(M.a,{}));var c=Object(d.a)(j.b,{id:"empty_column.domain_blocks",defaultMessage:"There are no hidden domains yet."});return Object(d.a)(y.a,{bindToDocument:!i,icon:"minus-circle",heading:e.formatMessage(I.heading)},void 0,Object(d.a)(_.a,{}),Object(d.a)(T.a,{scrollKey:"domain_blocks",onLoadMore:this.handleLoadMore,hasMore:t,shouldUpdateScroll:a,emptyMessage:c,bindToDocument:!i},void 0,o.map((function(n){return Object(d.a)(N,{domain:n},n)}))))},e}(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,multiColumn:g.a.bool}),c=s))||c)||c}}]);
2018-08-12 13:29:30 +00:00
//# sourceMappingURL=domain_blocks.js.map