forked from AkkomaGang/akkoma
2 lines
No EOL
5 KiB
JavaScript
2 lines
No EOL
5 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[73],{790:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return N}));var a,s,n,l=i(0),o=i(2),c=(i(9),i(6),i(8)),d=i(1),r=i(3),p=i.n(r),b=i(15),u=i(5),h=i.n(u),m=i(1059),j=i(760),O=i(758),v=i(252),f=i(7),g=i(765),_=i(34),y=i(30),M=i(45),C=i(1056),I=i(305),k=i(25);var w=Object(f.f)({deleteMessage:{id:"confirmations.delete_list.message",defaultMessage:"Are you sure you want to permanently delete this list?"},deleteConfirm:{id:"confirmations.delete_list.confirm",defaultMessage:"Delete"},all_replies:{id:"lists.replies_policy.all_replies",defaultMessage:"any followed user"},no_replies:{id:"lists.replies_policy.no_replies",defaultMessage:"no one"},list_replies:{id:"lists.replies_policy.list_replies",defaultMessage:"members of the list"}}),N=Object(b.connect)((function(e,t){return{list:e.getIn(["lists",t.params.id]),hasUnread:e.getIn(["timelines","list:"+t.params.id,"unread"])>0}}))(a=Object(f.g)((n=s=function(e){Object(c.a)(i,e);var t;t=i;function i(){for(var t,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return t=e.call.apply(e,[this].concat(a))||this,Object(d.a)(Object(o.a)(t),"handlePin",(function(){var e=t.props,i=e.columnId,a=e.dispatch;i?a(Object(v.h)(i)):(a(Object(v.e)("LIST",{id:t.props.params.id})),t.context.router.history.push("/"))})),Object(d.a)(Object(o.a)(t),"handleMove",(function(e){var i=t.props,a=i.columnId;(0,i.dispatch)(Object(v.g)(a,e))})),Object(d.a)(Object(o.a)(t),"handleHeaderClick",(function(){t.column.scrollTop()})),Object(d.a)(Object(o.a)(t),"setRef",(function(e){t.column=e})),Object(d.a)(Object(o.a)(t),"handleLoadMore",(function(e){var i=t.props.params.id;t.props.dispatch(Object(_.v)(i,{maxId:e}))})),Object(d.a)(Object(o.a)(t),"handleEditClick",(function(){t.props.dispatch(Object(M.d)("LIST_EDITOR",{listId:t.props.params.id}))})),Object(d.a)(Object(o.a)(t),"handleDeleteClick",(function(){var e=t.props,i=e.dispatch,a=e.columnId,s=e.intl,n=t.props.params.id;i(Object(M.d)("CONFIRM",{message:s.formatMessage(w.deleteMessage),confirm:s.formatMessage(w.deleteConfirm),onConfirm:function(){i(Object(y.F)(n)),a?i(Object(v.h)(a)):t.context.router.history.push("/lists")}}))})),Object(d.a)(Object(o.a)(t),"handleRepliesPolicyChange",(function(e){var i=e.target,a=t.props,s=(a.dispatch,a.list,t.props.params.id);t.props.dispatch(Object(y.Q)(s,void 0,!1,i.value))})),t}var a=i.prototype;return a.componentDidMount=function(){var e=this.props.dispatch,t=this.props.params.id;e(Object(y.G)(t)),e(Object(_.v)(t)),this.disconnect=e(Object(g.d)(t))},a.componentWillReceiveProps=function(e){var t=this.props.dispatch,i=e.params.id;i!==this.props.params.id&&(this.disconnect&&(this.disconnect(),this.disconnect=null),t(Object(y.G)(i)),t(Object(_.v)(i)),this.disconnect=t(Object(g.d)(i)))},a.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},a.render=function(){var e=this,t=this.props,i=t.hasUnread,a=t.columnId,s=t.multiColumn,n=t.list,o=(t.intl,this.props.params.id),c=!!a,d=n?n.get("title"):o,r=n?n.get("replies_policy"):void 0;return void 0===n?Object(l.a)(j.a,{},void 0,Object(l.a)("div",{className:"scrollable"},void 0,Object(l.a)(I.a,{}))):!1===n?Object(l.a)(j.a,{},void 0,Object(l.a)("div",{className:"scrollable"},void 0,Object(l.a)(C.a,{}))):p.a.createElement(j.a,{ref:this.setRef,label:d},Object(l.a)(O.a,{icon:"list-ul",active:i,title:d,onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:c,multiColumn:s,bindToDocument:!s},void 0,Object(l.a)("div",{className:"column-header__links"},void 0,Object(l.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.handleEditClick},void 0,Object(l.a)(k.a,{id:"pencil"})," ",Object(l.a)(f.b,{id:"lists.edit",defaultMessage:"Edit list"})),Object(l.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.handleDeleteClick},void 0,Object(l.a)(k.a,{id:"trash"})," ",Object(l.a)(f.b,{id:"lists.delete",defaultMessage:"Delete list"}))),void 0!==r&&Object(l.a)("div",{},void 0,Object(l.a)("div",{className:"column-settings__row"},void 0,Object(l.a)("fieldset",{},void 0,Object(l.a)("legend",{},void 0,Object(l.a)(f.b,{id:"lists.replies_policy.title",defaultMessage:"Show replies to:"})),["no_replies","list_replies","all_replies"].map((function(t){return Object(l.a)("div",{className:"setting-radio"},void 0,Object(l.a)("input",{className:"setting-radio__input",id:["setting","radio",o,t].join("-"),type:"radio",value:t,checked:r===t,onChange:e.handleRepliesPolicyChange}),Object(l.a)("label",{className:"setting-radio__label",htmlFor:["setting","radio",o,t].join("-")},void 0,p.a.createElement(f.b,w[t])))}))))),Object(l.a)("hr",{})),Object(l.a)(m.a,{trackScroll:!c,scrollKey:"list_timeline-"+a,timelineId:"list:"+o,onLoadMore:this.handleLoadMore,emptyMessage:Object(l.a)(f.b,{id:"empty_column.list",defaultMessage:"There is nothing in this list yet."}),bindToDocument:!s}))},i}(p.a.PureComponent),Object(d.a)(s,"contextTypes",{router:h.a.object}),a=n))||a)||a}}]);
|
|
//# sourceMappingURL=list_timeline.js.map
|