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

2 lines
2.4 KiB
JavaScript
Raw Normal View History

2020-05-20 05:55:14 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{820:function(a,t,o){"use strict";o.r(t),o.d(t,"default",(function(){return C}));var c,e,s,n=o(0),r=o(2),p=(o(9),o(6),o(8)),i=o(1),u=o(65),d=o.n(u),l=(o(3),o(15)),b=o(21),h=o(5),m=o.n(h),f=o(16),j=o.n(f),I=o(306),O=o(26),y=o(7),v=o(1053),w=o(757),M=o(1084),g=o(764),k=o(1049),A=o(1057);var C=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(a){Object(p.a)(o,a);var t;t=o;function o(){for(var t,o=arguments.length,c=new Array(o),e=0;e<o;e++)c[e]=arguments[e];return t=a.call.apply(a,[this].concat(c))||this,Object(i.a)(Object(r.a)(t),"handleLoadMore",d()((function(){t.props.dispatch(Object(O.y)(t.props.params.accountId))}),300,{leading:!0})),t}var c=o.prototype;return c.componentWillMount=function(){this.props.accountIds||(this.props.dispatch(Object(O.A)(this.props.params.accountId)),this.props.dispatch(Object(O.C)(this.props.params.accountId)))},c.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)))},c.render=function(){var a=this.props,t=a.shouldUpdateScroll,o=a.accountIds,c=a.hasMore,e=a.blockedBy,s=a.isAccount,r=a.multiColumn;if(!s)return Object(n.a)(w.a,{},void 0,Object(n.a)(A.a,{}));if(!o)return Object(n.a)(w.a,{},void 0,Object(n.a)(I.a,{}));var p=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)(w.a,{},void 0,Object(n.a)(g.a,{multiColumn:r}),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:p,bindToDocument:!r},void 0,e?[]:o.map((function(a){return Object(n.a)(v.a,{id:a,withNote:!1},a)})))))},o}(b.a),Object(i.a)(e,"propTypes",{params:m.a.object.isRequired,dispatch:m.a.func.isRequired,shouldUpdateScroll:m.a.func,accountIds:j.a.list,hasMore:m.a.bool,blockedBy:m.a.bool,isAccount:m.a.bool,multiColumn:m.a.bool}),c=s))||c}}]);
//# sourceMappingURL=followers.js.map