forked from AkkomaGang/akkoma
2 lines
No EOL
3.2 KiB
JavaScript
2 lines
No EOL
3.2 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{830:function(e,n,t){"use strict";t.r(n);var o,i,c,a=t(0),l=t(2),d=t(7),r=t(1),s=t(3),u=t.n(s),p=t(13),b=t(6),h=t(5),m=t.n(h),f=t(1033),j=t(734),O=t(732),g=t(32),M=t(249),y=t(1115),v=t(69),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(739);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.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){function n(){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(r.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(r.a)(Object(l.a)(n),"handleMove",(function(e){var t=n.props,o=t.columnId;(0,t.dispatch)(Object(M.g)(o,e))})),Object(r.a)(Object(l.a)(n),"handleHeaderClick",(function(){n.column.scrollTop()})),Object(r.a)(Object(l.a)(n),"setRef",(function(e){n.column=e})),Object(r.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}Object(d.a)(n,e);var t=n.prototype;return t.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}))},t.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}))}},t.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},t.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}))},n}(u.a.PureComponent),Object(r.a)(i,"defaultProps",{onlyMedia:!1}),Object(r.a)(i,"contextTypes",{router:m.a.object}),o=c))||o)||o}}]);
|
|
//# sourceMappingURL=public_timeline.js.map
|