honkoma/priv/static/packs/flavours/glitch/async/home_timeline.js

2 lines
4.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{816:function(e,t,n){"use strict";n.r(t);var i,o,s=n(0),a=n(2),c=n(7),l=n(1),r=n(3),u=n.n(r),d=n(13),h=n(32),m=n(1033),b=n(734),g=n(732),p=n(249),f=n(6),O=n(1073),j=n(1074),_=Object(f.f)({filter_regex:{id:"home.column_settings.filter_regex",defaultMessage:"Filter out by regular expressions"},settings:{id:"home.settings",defaultMessage:"Column settings"}}),v=Object(f.g)(i=function(e){function t(){return e.apply(this,arguments)||this}return Object(c.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.settings,n=e.onChange,i=e.intl;return Object(s.a)("div",{},void 0,Object(s.a)("span",{className:"column-settings__section"},void 0,Object(s.a)(f.b,{id:"home.column_settings.basic",defaultMessage:"Basic"})),Object(s.a)("div",{className:"column-settings__row"},void 0,Object(s.a)(O.a,{prefix:"home_timeline",settings:t,settingPath:["shows","reblog"],onChange:n,label:Object(s.a)(f.b,{id:"home.column_settings.show_reblogs",defaultMessage:"Show boosts"})})),Object(s.a)("div",{className:"column-settings__row"},void 0,Object(s.a)(O.a,{prefix:"home_timeline",settings:t,settingPath:["shows","reply"],onChange:n,label:Object(s.a)(f.b,{id:"home.column_settings.show_replies",defaultMessage:"Show replies"})})),Object(s.a)("div",{className:"column-settings__row"},void 0,Object(s.a)(O.a,{prefix:"home_timeline",settings:t,settingPath:["shows","direct"],onChange:n,label:Object(s.a)(f.b,{id:"home.column_settings.show_direct",defaultMessage:"Show DMs"})})),Object(s.a)("span",{className:"column-settings__section"},void 0,Object(s.a)(f.b,{id:"home.column_settings.advanced",defaultMessage:"Advanced"})),Object(s.a)("div",{className:"column-settings__row"},void 0,Object(s.a)(j.a,{prefix:"home_timeline",settings:t,settingPath:["regex","body"],onChange:n,label:i.formatMessage(_.filter_regex)})))},t}(u.a.PureComponent))||i,M=n(69),w=Object(d.connect)((function(e){return{settings:e.getIn(["settings","home"])}}),(function(e){return{onChange:function(t,n){e(Object(M.c)(["home"].concat(t),n))},onSave:function(){e(Object(M.d)())}}}))(v),P=n(316);n.d(t,"default",(function(){return y}));var C=Object(f.f)({title:{id:"column.home",defaultMessage:"Home"}}),y=Object(d.connect)((function(e){return{hasUnread:e.getIn(["timelines","home","unread"])>0,isPartial:e.getIn(["timelines","home","isPartial"])}}))(o=Object(f.g)(o=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return t=e.call.apply(e,[this].concat(i))||this,Object(l.a)(Object(a.a)(t),"handlePin",(function(){var e=t.props,n=e.columnId,i=e.dispatch;i(n?Object(p.h)(n):Object(p.e)("HOME",{}))})),Object(l.a)(Object(a.a)(t),"handleMove",(function(e){var n=t.props,i=n.columnId;(0,n.dispatch)(Object(p.g)(i,e))})),Object(l.a)(Object(a.a)(t),"handleHeaderClick",(function(){t.column.scrollTop()})),Object(l.a)(Object(a.a)(t),"setRef",(function(e){t.column=e})),Object(l.a)(Object(a.a)(t),"handleLoadMore",(function(e){t.props.dispatch(Object(h.u)({maxId:e}))})),t}Object(c.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this._checkIfReloadNeeded(!1,this.props.isPartial)},n.componentDidUpdate=function(e){this._checkIfReloadNeeded(e.isPartial,this.props.isPartial)},n.componentWillUnmount=function(){this._stopPolling()},n._checkIfReloadNeeded=function(e,t){var n=this.props.dispatch;e!==t&&(!e&&t?this.polling=setInterval((function(){n(Object(h.u)())}),3e3):e&&!t&&this._stopPolling())},n._stopPolling=function(){this.polling&&(clearInterval(this.polling),this.polling=null)},n.render=function(){var e=this.props,t=e.intl,n=e.hasUnread,i=e.columnId,o=e.multiColumn,a=!!i;return u.a.createElement(b.a,{bindToDocument:!o,ref:this.setRef,name:"home",label:t.formatMessage(C.title)},Object(s.a)(g.a,{icon:"home",active:n,title:t.formatMessage(C.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:a,multiColumn:o},void 0,Object(s.a)(w,{})),Object(s.a)(m.a,{trackScroll:!a,scrollKey:"home_timeline-"+i,onLoadMore:this.handleLoadMore,timelineId:"home",emptyMessage:Object(s.a)(f.b,{id:"empty_column.home",defaultMessage:"Your home timeline is empty! Visit {public} or use search to get started and meet other users.",values:{public:Object(s.a)(P.a,{to:"/timelines/public"},void 0,Object(s.a)(f.b,{id:"empty_column.home.public_timeline",defaultMessage:"the public timeline"}))}}),bindToDocument:!o}))},t}(u.a.PureComponent))||o)||o}}]);
//# sourceMappingURL=home_timeline.js.map