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

2 lines
2.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{683:function(t,e,a){"use strict";a.r(e),a.d(e,"default",function(){return C});var o,n,s,r=a(0),i=a(3),c=a(7),u=a(1),l=a(56),d=a.n(l),h=a(2),p=a.n(h),f=a(24),b=a(5),j=a.n(b),O=a(27),g=a.n(O),m=a(192),v=a(625),M=a(627),I=a(223),w=a(909),y=a(6),L=a(25),k=Object(y.f)({heading:{id:"column.favourites",defaultMessage:"Favourites"}}),C=Object(f.connect)(function(t){return{statusIds:t.getIn(["status_lists","favourites","items"]),isLoading:t.getIn(["status_lists","favourites","isLoading"],!0),hasMore:!!t.getIn(["status_lists","favourites","next"])}})(o=Object(y.g)((s=n=function(n){function t(){for(var o,t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];return o=n.call.apply(n,[this].concat(e))||this,Object(u.a)(Object(i.a)(o),"handlePin",function(){var t=o.props,e=t.columnId,a=t.dispatch;a(e?Object(I.h)(e):Object(I.e)("FAVOURITES",{}))}),Object(u.a)(Object(i.a)(o),"handleMove",function(t){var e=o.props,a=e.columnId;(0,e.dispatch)(Object(I.g)(a,t))}),Object(u.a)(Object(i.a)(o),"handleHeaderClick",function(){o.column.scrollTop()}),Object(u.a)(Object(i.a)(o),"setRef",function(t){o.column=t}),Object(u.a)(Object(i.a)(o),"handleLoadMore",d()(function(){o.props.dispatch(Object(m.g)())},300,{leading:!0})),o}Object(c.a)(t,n);var e=t.prototype;return e.componentWillMount=function(){this.props.dispatch(Object(m.h)())},e.render=function(){var t=this.props,e=t.intl,a=t.shouldUpdateScroll,o=t.statusIds,n=t.columnId,s=t.multiColumn,i=t.hasMore,c=t.isLoading,u=!!n,l=Object(r.a)(y.b,{id:"empty_column.favourited_statuses",defaultMessage:"You don't have any favourite toots yet. When you favourite one, it will show up here."});return p.a.createElement(v.a,{ref:this.setRef,label:e.formatMessage(k.heading)},Object(r.a)(M.a,{icon:"star",title:e.formatMessage(k.heading),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:u,multiColumn:s,showBackButton:!0}),Object(r.a)(w.a,{trackScroll:!u,statusIds:o,scrollKey:"favourited_statuses-"+n,hasMore:i,isLoading:c,onLoadMore:this.handleLoadMore,shouldUpdateScroll:a,emptyMessage:l}))},t}(L.a),Object(u.a)(n,"propTypes",{dispatch:j.a.func.isRequired,shouldUpdateScroll:j.a.func,statusIds:g.a.list.isRequired,intl:j.a.object.isRequired,columnId:j.a.string,multiColumn:j.a.bool,hasMore:j.a.bool,isLoading:j.a.bool}),o=s))||o)||o}}]);
//# sourceMappingURL=favourited_statuses.js.map