pleroma/priv/static/packs/features/lists.js
Haelwenn (lanodan) Monnier 83e3afac2c Update mastodon frontend
2018-09-20 16:13:13 +00:00

2 lines
2.9 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{703:function(t,e,n){"use strict";n.r(e);var i,s,a,l,o=n(0),r=n.n(o),u=n(6),c=n.n(u),d=n(3),p=n.n(d),f=n(7),h=n.n(f),g=n(1),b=n.n(g),m=n(12),v=n(2),y=n.n(v),j=n(17),w=n.n(j),C=n(194),M=n(193),O=n(197),S=n(23),k=n(4),q=n(18),x=n(698),N=n(697),R=n(20),A=Object(k.f)({label:{id:"lists.new.title_placeholder",defaultMessage:"New list title"},title:{id:"lists.new.create",defaultMessage:"Add list"}}),E=Object(m.connect)(function(t){return{value:t.getIn(["listEditor","title"]),disabled:t.getIn(["listEditor","isSubmitting"])}},function(t){return{onChange:function(e){return t(Object(S.w)(e))},onSubmit:function(){return t(Object(S.G)(!0))}}})(i=Object(k.g)(i=function(t){function e(){var n,i,s;c()(this,e);for(var a=arguments.length,l=Array(a),o=0;o<a;o++)l[o]=arguments[o];return n=i=p()(this,t.call.apply(t,[this].concat(l))),i.handleChange=function(t){i.props.onChange(t.target.value)},i.handleSubmit=function(t){t.preventDefault(),i.props.onSubmit()},i.handleClick=function(){i.props.onSubmit()},s=n,p()(i,s)}return h()(e,t),e.prototype.render=function(){var t=this.props,e=t.value,n=t.disabled,i=t.intl,s=i.formatMessage(A.label),a=i.formatMessage(A.title);return r()("form",{className:"column-inline-form",onSubmit:this.handleSubmit},void 0,r()("label",{},void 0,r()("span",{style:{display:"none"}},void 0,s),r()("input",{className:"setting-text",value:e,disabled:n,onChange:this.handleChange,placeholder:s})),r()(R.a,{disabled:n,icon:"plus",title:a,onClick:this.handleClick}))},e}(b.a.PureComponent))||i)||i,I=n(49),J=n(195);n.d(e,"default",function(){return W});var L=Object(k.f)({heading:{id:"column.lists",defaultMessage:"Lists"},subheading:{id:"lists.subheading",defaultMessage:"Your lists"}}),U=Object(I.createSelector)([function(t){return t.get("lists")}],function(t){return t?t.toList().filter(function(t){return!!t}).sort(function(t,e){return t.get("title").localeCompare(e.get("title"))}):t}),W=Object(m.connect)(function(t){return{lists:U(t)}})(s=Object(k.g)((l=a=function(t){function e(){return c()(this,e),p()(this,t.apply(this,arguments))}return h()(e,t),e.prototype.componentWillMount=function(){this.props.dispatch(Object(S.C)())},e.prototype.render=function(){var t=this.props,e=t.intl,n=t.shouldUpdateScroll,i=t.lists;if(!i)return r()(M.a,{},void 0,r()(C.a,{}));var s=r()(k.b,{id:"empty_column.lists",defaultMessage:"You don't have any lists yet. When you create one, it will show up here."});return r()(M.a,{icon:"list-ul",heading:e.formatMessage(L.heading)},void 0,r()(O.a,{}),r()(E,{}),r()(N.a,{text:e.formatMessage(L.subheading)}),r()(J.a,{scrollKey:"lists",shouldUpdateScroll:n,emptyMessage:s},void 0,i.map(function(t){return r()(x.a,{to:"/timelines/list/"+t.get("id"),icon:"list-ul",text:t.get("title")},t.get("id"))})))},e}(q.a),a.propTypes={params:y.a.object.isRequired,dispatch:y.a.func.isRequired,lists:w.a.list,intl:y.a.object.isRequired},s=l))||s)||s}}]);
//# sourceMappingURL=lists.js.map