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

2 lines
2.2 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{678:function(a,t,o){"use strict";o.r(t),o.d(t,"default",function(){return _});var e,c,s,n=o(0),r=o(3),p=o(7),d=o(1),i=o(56),u=o.n(i),l=(o(2),o(24)),b=o(25),h=o(5),f=o.n(h),m=o(27),j=o.n(m),I=o(272),O=o(26),y=o(6),w=o(891),M=o(625),v=o(913),g=o(628),k=o(889),_=Object(l.connect)(function(a,t){return{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=c=function(c){function a(){for(var a,t=arguments.length,o=new Array(t),e=0;e<t;e++)o[e]=arguments[e];return a=c.call.apply(c,[this].concat(o))||this,Object(d.a)(Object(r.a)(a),"handleLoadMore",u()(function(){a.props.dispatch(Object(O.y)(a.props.params.accountId))},300,{leading:!0})),a}Object(p.a)(a,c);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,e=a.hasMore,c=a.blockedBy;if(!o)return Object(n.a)(M.a,{},void 0,Object(n.a)(I.a,{}));var s=c?Object(n.a)(y.b,{id:"empty_column.account_timeline_blocked",defaultMessage:"You are blocked"}):Object(n.a)(y.b,{id:"account.followers.empty",defaultMessage:"No one follows this user yet."});return Object(n.a)(M.a,{},void 0,Object(n.a)(g.a,{}),Object(n.a)(k.a,{scrollKey:"followers",hasMore:e,onLoadMore:this.handleLoadMore,shouldUpdateScroll:t,prepend:Object(n.a)(v.a,{accountId:this.props.params.accountId,hideTabs:!0}),alwaysPrepend:!0,emptyMessage:s},void 0,c?[]:o.map(function(a){return Object(n.a)(w.a,{id:a,withNote:!1},a)})))},a}(b.a),Object(d.a)(c,"propTypes",{params:f.a.object.isRequired,dispatch:f.a.func.isRequired,shouldUpdateScroll:f.a.func,accountIds:j.a.list,hasMore:f.a.bool,blockedBy:f.a.bool}),e=s))||e}}]);
//# sourceMappingURL=followers.js.map