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

2 lines
2.3 KiB
JavaScript
Raw Normal View History

2019-06-26 19:06:28 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{679:function(a,t,o){"use strict";o.r(t),o.d(t,"default",function(){return _});var c,e,s,n=o(0),r=o(2),p=o(6),i=o(1),u=o(56),d=o.n(u),l=(o(3),o(21)),b=o(25),h=o(5),f=o.n(h),j=o(26),m=o.n(j),I=o(272),O=o(27),y=o(7),w=o(895),v=o(626),M=o(917),g=o(629),k=o(893),A=o(897),_=Object(l.connect)(function(a,t){return{isAccount:!!a.getIn(["accounts",t.params.accountId]),accountIds:a.getIn(["user_lists","followers",t.params.accountId,"items"]),hasMore:!!a.getIn(["user_lists","followers",t.params.accountId,"next"]),blockedBy:a.getIn(["relationships",t.params.accountId,"blocked_by"],!1)}})((s=e=function(e){function a(){for(var a,t=arguments.length,o=new Array(t),c=0;c<t;c++)o[c]=arguments[c];return a=e.call.apply(e,[this].concat(o))||this,Object(i.a)(Object(r.a)(a),"handleLoadMore",d()(function(){a.props.dispatch(Object(O.y)(a.props.params.accountId))},300,{leading:!0})),a}Object(p.a)(a,e);var t=a.prototype;return t.componentWillMount=function(){this.props.dispatch(Object(O.A)(this.props.params.accountId)),this.props.dispatch(Object(O.C)(this.props.params.accountId))},t.componentWillReceiveProps=function(a){a.params.accountId!==this.props.params.accountId&&a.params.accountId&&(this.props.dispatch(Object(O.A)(a.params.accountId)),this.props.dispatch(Object(O.C)(a.params.accountId)))},t.render=function(){var a=this.props,t=a.shouldUpdateScroll,o=a.accountIds,c=a.hasMore,e=a.blockedBy;if(!a.isAccount)return Object(n.a)(v.a,{},void 0,Object(n.a)(A.a,{}));if(!o)return Object(n.a)(v.a,{},void 0,Object(n.a)(I.a,{}));var s=e?Object(n.a)(y.b,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"}):Object(n.a)(y.b,{id:"account.followers.empty",defaultMessage:"No one follows this user yet."});return Object(n.a)(v.a,{},void 0,Object(n.a)(g.a,{}),Object(n.a)(k.a,{scrollKey:"followers",hasMore:c,onLoadMore:this.handleLoadMore,shouldUpdateScroll:t,prepend:Object(n.a)(M.a,{accountId:this.props.params.accountId,hideTabs:!0}),alwaysPrepend:!0,emptyMessage:s},void 0,e?[]:o.map(function(a){return Object(n.a)(w.a,{id:a,withNote:!1},a)})))},a}(b.a),Object(i.a)(e,"propTypes",{params:f.a.object.isRequired,dispatch:f.a.func.isRequired,shouldUpdateScroll:f.a.func,accountIds:m.a.list,hasMore:f.a.bool,blockedBy:f.a.bool,isAccount:f.a.bool}),c=s))||c}}]);
//# sourceMappingURL=followers.js.map