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

2 lines
3.2 KiB
JavaScript
Raw Normal View History

2018-09-20 10:10:13 -06:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{701:function(e,n,t){"use strict";t.r(n);var o,i,c,a=t(0),l=t.n(a),r=t(6),d=t.n(r),s=t(3),u=t.n(s),p=t(7),h=t.n(p),m=t(1),f=t.n(m),g=t(12),y=t(4),M=t(2),b=t.n(M),I=t(88),v=t(62),j=t(60),O=t(19),C=t(113),w=t(699),U=t(33),k=Object(g.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(C.f)(t,n,o):Object(U.c)(["public"].concat(n),o))}}})(w.a),P=t(63);t.d(n,"default",function(){return S});var x=Object(y.f)({title:{id:"column.public",defaultMessage:"Federated timeline"}}),S=Object(g.connect)(function(e,n){var t=n.onlyMedia,o=n.columnId,i=o,c=e.getIn(["settings","columns"]),a=c.findIndex(function(e){return e.get("uuid")===i});return{hasUnread:e.getIn(["timelines","public"+(t?":media":""),"unread"])>0,onlyMedia:o&&a>=0?c.get(a).getIn(["params","other","onlyMedia"]):e.getIn(["settings","public","other","onlyMedia"])}})(o=Object(y.g)((c=i=function(e){function n(){var t,o,i;d()(this,n);for(var c=arguments.length,a=Array(c),l=0;l<c;l++)a[l]=arguments[l];return t=o=u()(this,e.call.apply(e,[this].concat(a))),o.handlePin=function(){var e=o.props,n=e.columnId,t=e.dispatch,i=e.onlyMedia;t(n?Object(C.h)(n):Object(C.e)("PUBLIC",{other:{onlyMedia:i}}))},o.handleMove=function(e){var n=o.props,t=n.columnId;(0,n.dispatch)(Object(C.g)(t,e))},o.handleHeaderClick=function(){o.column.scrollTop()},o.setRef=function(e){o.column=e},o.handleLoadMore=function(e){var n=o.props,t=n.dispatch,i=n.onlyMedia;t(Object(O.r)({maxId:e,onlyMedia:i}))},o.handleSettingChanged=function(e,n){o.props.columnId||"other"!==e[0]||"onlyMedia"!==e[1]||o.context.router.history.replace("/timelines/public"+(n?"/media":""))},i=t,u()(o,i)}return h()(n,e),n.prototype.componentDidMount=function(){var e=this.props,n=e.dispatch,t=e.onlyMedia;n(Object(O.r)({onlyMedia:t})),this.disconnect=n(Object(P.e)({onlyMedia:t}))},n.prototype.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(P.e)({onlyMedia:o}))}},n.prototype.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},n.prototype.render=function(){var e=this.props,n=e.intl,t=e.shouldUpdateScroll,o=e.columnId,i=e.hasUnread,c=e.multiColumn,a=e.onlyMedia,r=!!o;return f.a.createElement(v.a,{ref:this.setRef,label:n.formatMessage(x.title)},l()(j.a,{icon:"globe",active:i,title:n.formatMessage(x.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:r,multiColumn:c},void 0,l()(k,{onChange:this.handleSettingChanged,columnId:o})),l()(I.a,{timelineId:"public"+(a?":media":""),onLoadMore:this.handleLoadMore,trackScroll:!r,scrollKey:"public_timeline-"+o,emptyMessage:l()(y.b,{id:"empty_column.public",defaultMessage:"There is nothing here! Write something publicly, or manually follow users from other instances to fill it up"}),shouldUpdateScroll:t}))},n}(f.a.PureComponent),i.contextTypes={router:b.a.object},i.defaultProps={onlyMedia:!1},o=c))||o)||o}}]);
//# sourceMappingURL=public_timeline.js.map