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

2 lines
3.2 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{714:function(e,t,n){"use strict";n.r(t);var o,i,c,d=n(0),a=n(3),l=n(7),r=n(1),s=n(2),u=n.n(s),p=n(24),b=n(6),h=n(5),m=n.n(h),f=n(898),j=n(631),O=n(627),M=n(35),g=n(223),y=n(983),v=n(69),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(633);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(r.a)(Object(a.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(r.a)(Object(a.a)(i),"handleMove",function(e){var t=i.props,n=t.columnId;(0,t.dispatch)(Object(g.g)(n,e))}),Object(r.a)(Object(a.a)(i),"handleHeaderClick",function(){i.column.scrollTop()}),Object(r.a)(Object(a.a)(i),"setRef",function(e){i.column=e}),Object(r.a)(Object(a.a)(i),"handleLoadMore",function(e){var t=i.props,n=t.dispatch,o=t.onlyMedia;n(Object(M.u)({maxId:e,onlyMedia:o}))}),i}Object(l.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){var e=this.props,t=e.dispatch,n=e.onlyMedia;t(Object(M.u)({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.u)({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(d.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(d.a)(I,{columnId:o})),Object(d.a)(f.a,{timelineId:"public"+(a?":media":""),onLoadMore:this.handleLoadMore,trackScroll:!l,scrollKey:"public_timeline-"+o,emptyMessage:Object(d.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(r.a)(i,"contextTypes",{router:m.a.object}),Object(r.a)(i,"defaultProps",{onlyMedia:!1}),o=c))||o)||o}}]);
//# sourceMappingURL=public_timeline.js.map