spc-pleroma/priv/static/packs/flavours/glitch/async/followers.js

2 lines
2.6 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{796:function(t,a,c){"use strict";c.r(a),c.d(a,"default",(function(){return T}));var o,e,n,s=c(0),r=c(2),p=(c(9),c(6),c(8)),i=c(1),u=c(65),l=c.n(u),d=c(3),h=c.n(d),b=c(15),m=c(5),f=c.n(m),j=c(16),O=c.n(j),I=c(305),w=c(24),v=c(7),M=c(471),g=c(756),y=c(1079),C=c(1083),H=c(21),k=c(1056),R=c(1048);var T=Object(b.connect)((function(t,a){return{isAccount:!!t.getIn(["accounts",a.params.accountId]),accountIds:t.getIn(["user_lists","followers",a.params.accountId,"items"]),hasMore:!!t.getIn(["user_lists","followers",a.params.accountId,"next"])}}))((n=e=function(t){Object(p.a)(c,t);var a;a=c;function c(){for(var a,c=arguments.length,o=new Array(c),e=0;e<c;e++)o[e]=arguments[e];return a=t.call.apply(t,[this].concat(o))||this,Object(i.a)(Object(r.a)(a),"handleHeaderClick",(function(){a.column.scrollTop()})),Object(i.a)(Object(r.a)(a),"handleScroll",(function(t){var c=t.target;c.scrollTop===c.scrollHeight-c.clientHeight&&a.props.hasMore&&a.props.dispatch(Object(w.D)(a.props.params.accountId))})),Object(i.a)(Object(r.a)(a),"handleLoadMore",l()((function(){a.props.dispatch(Object(w.D)(a.props.params.accountId))}),300,{leading:!0})),Object(i.a)(Object(r.a)(a),"setRef",(function(t){a.column=t})),a}var o=c.prototype;return o.componentWillMount=function(){this.props.accountIds||(this.props.dispatch(Object(w.F)(this.props.params.accountId)),this.props.dispatch(Object(w.H)(this.props.params.accountId)))},o.componentWillReceiveProps=function(t){t.params.accountId!==this.props.params.accountId&&t.params.accountId&&(this.props.dispatch(Object(w.F)(t.params.accountId)),this.props.dispatch(Object(w.H)(t.params.accountId)))},o.render=function(){var t=this.props,a=t.accountIds,c=t.hasMore,o=t.isAccount,e=t.multiColumn;if(!o)return Object(s.a)(g.a,{},void 0,Object(s.a)(k.a,{}));if(!a)return Object(s.a)(g.a,{},void 0,Object(s.a)(I.a,{}));var n=Object(s.a)(v.b,{id:"account.followers.empty",defaultMessage:"No one follows this user yet."});return(h.a.createElement(g.a,{ref:this.setRef},Object(s.a)(y.a,{onClick:this.handleHeaderClick,multiColumn:e}),Object(s.a)(R.a,{scrollKey:"followers",hasMore:c,onLoadMore:this.handleLoadMore,prepend:Object(s.a)(C.a,{accountId:this.props.params.accountId,hideTabs:!0}),alwaysPrepend:!0,emptyMessage:n,bindToDocument:!e},void 0,a.map((function(t){return Object(s.a)(M.a,{id:t,withNote:!1},t)})))))},c}(H.a),Object(i.a)(e,"propTypes",{params:f.a.object.isRequired,dispatch:f.a.func.isRequired,accountIds:O.a.list,hasMore:f.a.bool,isAccount:f.a.bool,multiColumn:f.a.bool}),o=n))||o}}]);
//# sourceMappingURL=followers.js.map