mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 02:02:19 +00:00
2 lines
3.9 KiB
JavaScript
2 lines
3.9 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{814:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return D}));var n,a,s,c=i(0),o=i(2),l=(i(9),i(6),i(8)),d=i(1),r=i(3),p=i.n(r),u=i(15),b=i(5),h=i.n(b),m=i(1063),O=i(762),j=i(764),f=i(759),v=i(253),g=i(7),M=i(766),C=i(36),I=i(31),y=i(48),k=i(1057),_=i(306),w=i(27);var x=Object(g.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"}}),D=Object(u.connect)((function(e,t){return{list:e.getIn(["lists",t.params.id]),hasUnread:e.getIn(["timelines","list:"+t.params.id,"unread"])>0}}))(n=Object(g.g)((s=a=function(e){Object(l.a)(i,e);var t;t=i;function i(){for(var t,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return t=e.call.apply(e,[this].concat(n))||this,Object(d.a)(Object(o.a)(t),"handlePin",(function(){var e=t.props,i=e.columnId,n=e.dispatch;i?n(Object(v.h)(i)):(n(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,n=i.columnId;(0,i.dispatch)(Object(v.g)(n,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(C.u)(i,{maxId:e}))})),Object(d.a)(Object(o.a)(t),"handleEditClick",(function(){t.props.dispatch(Object(y.d)("LIST_EDITOR",{listId:t.props.params.id}))})),Object(d.a)(Object(o.a)(t),"handleDeleteClick",(function(){var e=t.props,i=e.dispatch,n=e.columnId,a=e.intl,s=t.props.params.id;i(Object(y.d)("CONFIRM",{message:a.formatMessage(x.deleteMessage),confirm:a.formatMessage(x.deleteConfirm),onConfirm:function(){i(Object(I.F)(s)),n?i(Object(v.h)(n)):t.context.router.history.push("/lists")}}))})),t}var n=i.prototype;return n.componentDidMount=function(){var e=this.props.dispatch,t=this.props.params.id;e(Object(I.G)(t)),e(Object(C.u)(t)),this.disconnect=e(Object(M.d)(t))},n.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(I.G)(i)),t(Object(C.u)(i)),this.disconnect=t(Object(M.d)(i)))},n.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},n.render=function(){var e=this.props,t=e.shouldUpdateScroll,i=e.hasUnread,n=e.columnId,a=e.multiColumn,s=e.list,o=this.props.params.id,l=!!n,d=s?s.get("title"):o;return void 0===s?Object(c.a)(O.a,{},void 0,Object(c.a)("div",{className:"scrollable"},void 0,Object(c.a)(_.a,{}))):!1===s?Object(c.a)(O.a,{},void 0,Object(c.a)(j.a,{multiColumn:a}),Object(c.a)(k.a,{})):p.a.createElement(O.a,{bindToDocument:!a,ref:this.setRef,label:d},Object(c.a)(f.a,{icon:"list-ul",active:i,title:d,onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:l,multiColumn:a},void 0,Object(c.a)("div",{className:"column-header__links"},void 0,Object(c.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.handleEditClick},void 0,Object(c.a)(w.a,{id:"pencil"})," ",Object(c.a)(g.b,{id:"lists.edit",defaultMessage:"Edit list"})),Object(c.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.handleDeleteClick},void 0,Object(c.a)(w.a,{id:"trash"})," ",Object(c.a)(g.b,{id:"lists.delete",defaultMessage:"Delete list"})))),Object(c.a)(m.a,{trackScroll:!l,scrollKey:"list_timeline-"+n,timelineId:"list:"+o,onLoadMore:this.handleLoadMore,emptyMessage:Object(c.a)(g.b,{id:"empty_column.list",defaultMessage:"There is nothing in this list yet. When members of this list post new statuses, they will appear here."}),shouldUpdateScroll:t,bindToDocument:!a}))},i}(p.a.PureComponent),Object(d.a)(a,"contextTypes",{router:h.a.object}),n=s))||n)||n}}]);
|
|
//# sourceMappingURL=list_timeline.js.map
|