Pleroma/priv/static/packs/flavours/glitch/async/community_timeline.js

2 lines
3.2 KiB
JavaScript
Raw Normal View History

2020-05-20 07:55:14 +02:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{857:function(e,n,t){"use strict";t.r(n),t.d(n,"default",(function(){return k}));var o,i,c,a=t(0),l=t(2),d=(t(9),t(6),t(8)),r=t(1),s=t(3),u=t.n(s),m=t(15),p=t(7),h=t(5),b=t.n(h),f=t(1059),y=t(760),j=t(758),O=t(34),M=t(252),g=t(1147),v=t(73),I=Object(m.connect)((function(e,n){var t=n.columnId,o=e.getIn(["settings","columns"]),i=o.findIndex((function(e){return e.get("uuid")===t}));return{settings:t&&i>=0?o.get(i).get("params"):e.getIn(["settings","community"])}}),(function(e,n){var t=n.columnId;return{onChange:function(n,o){e(t?Object(M.f)(t,n,o):Object(v.c)(["community"].concat(n),o))}}}))(g.a),C=t(765);var w=Object(p.f)({title:{id:"column.community",defaultMessage:"Local timeline"}}),k=Object(m.connect)((function(e,n){var t=n.columnId,o=t,i=e.getIn(["settings","columns"]),c=i.findIndex((function(e){return e.get("uuid")===o})),a=t&&c>=0?i.get(c).getIn(["params","other","onlyMedia"]):e.getIn(["settings","community","other","onlyMedia"]),l=e.getIn(["timelines","community"+(a?":media":"")]);return{hasUnread:!!l&&l.get("unread")>0,onlyMedia:a}}))(o=Object(p.g)((c=i=function(e){Object(d.a)(t,e);var n;n=t;function t(){for(var n,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return n=e.call.apply(e,[this].concat(o))||this,Object(r.a)(Object(l.a)(n),"handlePin",(function(){var e=n.props,t=e.columnId,o=e.dispatch,i=e.onlyMedia;o(t?Object(M.h)(t):Object(M.e)("COMMUNITY",{other:{onlyMedia:i}}))})),Object(r.a)(Object(l.a)(n),"handleMove",(function(e){var t=n.props,o=t.columnId;(0,t.dispatch)(Object(M.g)(o,e))})),Object(r.a)(Object(l.a)(n),"handleHeaderClick",(function(){n.column.scrollTop()})),Object(r.a)(Object(l.a)(n),"setRef",(function(e){n.column=e})),Object(r.a)(Object(l.a)(n),"handleLoadMore",(function(e){var t=n.props,o=t.dispatch,i=t.onlyMedia;o(Object(O.r)({maxId:e,onlyMedia:i}))})),n}var o=t.prototype;return o.componentDidMount=function(){var e=this.props,n=e.dispatch,t=e.onlyMedia;n(Object(O.r)({onlyMedia:t})),this.disconnect=n(Object(C.a)({onlyMedia:t}))},o.componentDidUpdate=function(e){if(e.onlyMedia!==this.props.onlyMedia){var n=this.props,t=n.dispatch,o=n.onlyMedia;this.disconnect(),t(Object(O.r)({onlyMedia:o})),this.disconnect=t(Object(C.a)({onlyMedia:o}))}},o.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},o.render=function(){var e=this.props,n=e.intl,t=e.hasUnread,o=e.columnId,i=e.multiColumn,c=e.onlyMedia,l=!!o;return u.a.createElement(y.a,{ref:this.setRef,name:"local",bindToDocument:!i,label:n.formatMessage(w.title)},Object(a.a)(j.a,{icon:"users",active:t,title:n.formatMessage(w.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:l,multiColumn:i},void 0,Object(a.a)(I,{columnId:o})),Object(a.a)(f.a,{trackScroll:!l,scrollKey:"community_timeline-"+o,timelineId:"community"+(c?":media":""),onLoadMore:this.handleLoadMore,emptyMessage:Object(a.a)(p.b,{id:"empty_column.community",defaultMessage:"The local timeline is empty. Write something publicly to get the ball rolling!"}),bindToDocument:!i}))},t}(u.a.PureComponent),Object(r.a)(i,"defaultProps",{onlyMedia:!1}),Object(r.a)(i,"contextTypes",{router:b.a.object}),o=c))||o)||o}}]);
2018-09-16 23:17:34 +02:00
//# sourceMappingURL=community_timeline.js.map