Pleroma/priv/static/packs/flavours/glitch/async/public_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([[81],{856: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),r=(t(9),t(6),t(8)),d=t(1),s=t(3),u=t.n(s),p=t(15),b=t(7),h=t(5),m=t.n(h),f=t(1059),j=t(760),O=t(758),g=t(34),M=t(252),y=t(1147),v=t(73),I=Object(p.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","public"])}}),(function(e,n){var t=n.columnId;return{onChange:function(n,o){e(t?Object(M.f)(t,n,o):Object(v.c)(["public"].concat(n),o))}}}))(y.a),w=t(765);var C=Object(b.f)({title:{id:"column.public",defaultMessage:"Federated timeline"}}),k=Object(p.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","public","other","onlyMedia"]),l=e.getIn(["timelines","public"+(a?":media":"")]);return{hasUnread:!!l&&l.get("unread")>0,onlyMedia:a}}))(o=Object(b.g)((c=i=function(e){Object(r.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(d.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)("PUBLIC",{other:{onlyMedia:i}}))})),Object(d.a)(Object(l.a)(n),"handleMove",(function(e){var t=n.props,o=t.columnId;(0,t.dispatch)(Object(M.g)(o,e))})),Object(d.a)(Object(l.a)(n),"handleHeaderClick",(function(){n.column.scrollTop()})),Object(d.a)(Object(l.a)(n),"setRef",(function(e){n.column=e})),Object(d.a)(Object(l.a)(n),"handleLoadMore",(function(e){var t=n.props,o=t.dispatch,i=t.onlyMedia;o(Object(g.w)({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(g.w)({onlyMedia:t})),this.disconnect=n(Object(w.e)({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(g.w)({onlyMedia:o})),this.disconnect=t(Object(w.e)({onlyMedia:o}))}},o.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},o.render=function(){var e=this.props,n=e.intl,t=e.columnId,o=e.hasUnread,i=e.multiColumn,c=e.onlyMedia,l=!!t;return u.a.createElement(j.a,{bindToDocument:!i,ref:this.setRef,name:"federated",label:n.formatMessage(C.title)},Object(a.a)(O.a,{icon:"globe",active:o,title:n.formatMessage(C.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:l,multiColumn:i},void 0,Object(a.a)(I,{columnId:t})),Object(a.a)(f.a,{timelineId:"public"+(c?":media":""),onLoadMore:this.handleLoadMore,trackScroll:!l,scrollKey:"public_timeline-"+t,emptyMessage:Object(a.a)(b.b,{id:"empty_column.public",defaultMessage:"There is nothing here! Write something publicly, or manually follow users from other servers to fill it up"}),bindToDocument:!i}))},t}(u.a.PureComponent),Object(d.a)(i,"defaultProps",{onlyMedia:!1}),Object(d.a)(i,"contextTypes",{router:m.a.object}),o=c))||o)||o}}]);
2018-09-16 23:17:34 +02:00
//# sourceMappingURL=public_timeline.js.map