pleroma/priv/static/packs/flavours/glitch/async/public_timeline.js
2020-01-22 16:00:23 +01:00

2 lines
No EOL
3.1 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[79],{762:function(e,n,t){"use strict";t.r(n);var i,o,c,a=t(0),l=t(2),r=t(7),d=t(1),s=t(3),u=t.n(s),p=t(12),b=t(6),h=t(5),m=t.n(h),f=t(973),j=t(667),O=t(664),M=t(33),g=t(243),y=t(1061),v=t(71),I=Object(p.connect)(function(e,n){var t=n.columnId,i=e.getIn(["settings","columns"]),o=i.findIndex(function(e){return e.get("uuid")===t});return{settings:t&&o>=0?i.get(o).get("params"):e.getIn(["settings","public"])}},function(e,n){var t=n.columnId;return{onChange:function(n,i){e(t?Object(g.f)(t,n,i):Object(v.c)(["public"].concat(n),i))}}})(y.a),w=t(671);t.d(n,"default",function(){return k});var C=Object(b.f)({title:{id:"column.public",defaultMessage:"Federated timeline"}}),k=Object(p.connect)(function(e,n){var t=n.onlyMedia,i=n.columnId,o=i,c=e.getIn(["settings","columns"]),a=c.findIndex(function(e){return e.get("uuid")===o});return{hasUnread:e.getIn(["timelines","public"+(t?":media":""),"unread"])>0,onlyMedia:i&&a>=0?c.get(a).getIn(["params","other","onlyMedia"]):e.getIn(["settings","public","other","onlyMedia"])}})(i=Object(b.g)((c=o=function(e){function n(){for(var n,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i))||this,Object(d.a)(Object(l.a)(n),"handlePin",function(){var e=n.props,t=e.columnId,i=e.dispatch,o=e.onlyMedia;i(t?Object(g.h)(t):Object(g.e)("PUBLIC",{other:{onlyMedia:o}}))}),Object(d.a)(Object(l.a)(n),"handleMove",function(e){var t=n.props,i=t.columnId;(0,t.dispatch)(Object(g.g)(i,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,i=t.dispatch,o=t.onlyMedia;i(Object(M.w)({maxId:e,onlyMedia:o}))}),n}Object(r.a)(n,e);var t=n.prototype;return t.componentDidMount=function(){var e=this.props,n=e.dispatch,t=e.onlyMedia;n(Object(M.w)({onlyMedia:t})),this.disconnect=n(Object(w.e)({onlyMedia:t}))},t.componentDidUpdate=function(e){if(e.onlyMedia!==this.props.onlyMedia){var n=this.props,t=n.dispatch,i=n.onlyMedia;this.disconnect(),t(Object(M.w)({onlyMedia:i})),this.disconnect=t(Object(w.e)({onlyMedia:i}))}},t.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},t.render=function(){var e=this.props,n=e.intl,t=e.columnId,i=e.hasUnread,o=e.multiColumn,c=e.onlyMedia,l=!!t;return u.a.createElement(j.a,{ref:this.setRef,name:"federated",label:n.formatMessage(C.title)},Object(a.a)(O.a,{icon:"globe",active:i,title:n.formatMessage(C.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:l,multiColumn:o},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"})}))},n}(u.a.PureComponent),Object(d.a)(o,"defaultProps",{onlyMedia:!1}),Object(d.a)(o,"contextTypes",{router:m.a.object}),i=c))||i)||i}}]);
//# sourceMappingURL=public_timeline.js.map