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

2 lines
No EOL
3.2 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{726:function(e,t,n){"use strict";n.r(t);var o,i,c,s=n(1),a=n(7),l=n(0),d=n(2),r=n(3),u=n.n(r),p=n(20),b=n(6),h=n(5),m=n.n(h),f=n(627),j=n(431),O=n(429),M=n(37),g=n(207),y=n(975),v=n(86),I=Object(p.connect)(function(e,t){var n=t.columnId,o=e.getIn(["settings","columns"]),i=o.findIndex(function(e){return e.get("uuid")===n});return{settings:n&&0<=i?o.get(i).get("params"):e.getIn(["settings","public"])}},function(n,e){var o=e.columnId;return{onChange:function(e,t){n(o?Object(g.f)(o,e,t):Object(v.c)(["public"].concat(e),t))}}})(y.a),w=n(400);n.d(t,"default",function(){return U});var C=Object(b.f)({title:{id:"column.public",defaultMessage:"Federated timeline"}}),U=Object(p.connect)(function(e,t){var n=t.onlyMedia,o=t.columnId,i=o,c=e.getIn(["settings","columns"]),a=c.findIndex(function(e){return e.get("uuid")===i});return{hasUnread:0<e.getIn(["timelines","public"+(n?":media":""),"unread"]),onlyMedia:o&&0<=a?c.get(a).getIn(["params","other","onlyMedia"]):e.getIn(["settings","public","other","onlyMedia"])}})(o=Object(b.g)((c=i=function(o){function e(){for(var i,e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i=o.call.apply(o,[this].concat(t))||this,Object(d.a)(Object(l.a)(Object(l.a)(i)),"handlePin",function(){var e=i.props,t=e.columnId,n=e.dispatch,o=e.onlyMedia;n(t?Object(g.h)(t):Object(g.e)("PUBLIC",{other:{onlyMedia:o}}))}),Object(d.a)(Object(l.a)(Object(l.a)(i)),"handleMove",function(e){var t=i.props,n=t.columnId;(0,t.dispatch)(Object(g.g)(n,e))}),Object(d.a)(Object(l.a)(Object(l.a)(i)),"handleHeaderClick",function(){i.column.scrollTop()}),Object(d.a)(Object(l.a)(Object(l.a)(i)),"setRef",function(e){i.column=e}),Object(d.a)(Object(l.a)(Object(l.a)(i)),"handleLoadMore",function(e){var t=i.props,n=t.dispatch,o=t.onlyMedia;n(Object(M.s)({maxId:e,onlyMedia:o}))}),i}Object(a.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){var e=this.props,t=e.dispatch,n=e.onlyMedia;t(Object(M.s)({onlyMedia:n})),this.disconnect=t(Object(w.e)({onlyMedia:n}))},t.componentDidUpdate=function(e){if(e.onlyMedia!==this.props.onlyMedia){var t=this.props,n=t.dispatch,o=t.onlyMedia;this.disconnect(),n(Object(M.s)({onlyMedia:o})),this.disconnect=n(Object(w.e)({onlyMedia:o}))}},t.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},t.render=function(){var e=this.props,t=e.intl,n=e.shouldUpdateScroll,o=e.columnId,i=e.hasUnread,c=e.multiColumn,a=e.onlyMedia,l=!!o;return u.a.createElement(j.a,{ref:this.setRef,label:t.formatMessage(C.title)},Object(s.a)(O.a,{icon:"globe",active:i,title:t.formatMessage(C.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:l,multiColumn:c},void 0,Object(s.a)(I,{columnId:o})),Object(s.a)(f.a,{timelineId:"public"+(a?":media":""),onLoadMore:this.handleLoadMore,trackScroll:!l,scrollKey:"public_timeline-"+o,emptyMessage:Object(s.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"}),shouldUpdateScroll:n}))},e}(u.a.PureComponent),Object(d.a)(i,"contextTypes",{router:m.a.object}),Object(d.a)(i,"defaultProps",{onlyMedia:!1}),o=c))||o)||o}}]);
//# sourceMappingURL=public_timeline.js.map