spc-pleroma/priv/static/packs/features/follow_requests.js

2 lines
3.2 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{720:function(e,t,a){"use strict";a.r(t);var c,o,n,i,r,s,u=a(1),l=a(6),d=a(0),j=a(2),p=a(54),b=a.n(p),f=(a(3),a(20)),h=a(7),O=a(24),v=a(5),_=a.n(v),m=a(26),g=a.n(m),w=a(291),q=a(641),y=a(645),M=a(155),z=a(408),R=a(141),N=a(142),I=a(64),k=Object(h.f)({authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}}),A=Object(h.g)((n=o=function(e){function t(){return e.apply(this,arguments)||this}return Object(l.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.intl,a=e.account,c=e.onAuthorize,o=e.onReject,n={__html:a.get("note_emojified")};return Object(u.a)("div",{className:"account-authorize__wrapper"},void 0,Object(u.a)("div",{className:"account-authorize"},void 0,Object(u.a)(z.a,{href:a.get("url"),to:"/accounts/"+a.get("id"),className:"detailed-status__display-name"},void 0,Object(u.a)("div",{className:"account-authorize__avatar"},void 0,Object(u.a)(R.a,{account:a,size:48})),Object(u.a)(N.a,{account:a})),Object(u.a)("div",{className:"account__header__content",dangerouslySetInnerHTML:n})),Object(u.a)("div",{className:"account--panel"},void 0,Object(u.a)("div",{className:"account--panel__button"},void 0,Object(u.a)(I.a,{title:t.formatMessage(k.authorize),icon:"check",onClick:c})),Object(u.a)("div",{className:"account--panel__button"},void 0,Object(u.a)(I.a,{title:t.formatMessage(k.reject),icon:"times",onClick:o}))))},t}(O.a),Object(j.a)(o,"propTypes",{account:g.a.map.isRequired,onAuthorize:_.a.func.isRequired,onReject:_.a.func.isRequired,intl:_.a.object.isRequired}),c=n))||c,L=a(27),S=Object(f.connect)(function(){var a=Object(M.d)();return function(e,t){return{account:a(e,t.id)}}},function(e,t){var a=t.id;return{onAuthorize:function(){e(Object(L.v)(a))},onReject:function(){e(Object(L.I)(a))}}})(A),T=a(642);a.d(t,"default",function(){return C});var U=Object(h.f)({heading:{id:"column.follow_requests",defaultMessage:"Follow requests"}}),C=Object(f.connect)(function(e){return{accountIds:e.getIn(["user_lists","follow_requests","items"])}})(i=Object(h.g)((s=r=function(o){function e(){for(var e,t=arguments.length,a=new Array(t),c=0;c<t;c++)a[c]=arguments[c];return e=o.call.apply(o,[this].concat(a))||this,Object(j.a)(Object(d.a)(Object(d.a)(e)),"handleLoadMore",b()(function(){e.props.dispatch(Object(L.x)())},300,{leading:!0})),e}Object(l.a)(e,o);var t=e.prototype;return t.componentWillMount=function(){this.props.dispatch(Object(L.B)())},t.render=function(){var e=this.props,t=e.intl,a=e.shouldUpdateScroll,c=e.accountIds;if(!c)return Object(u.a)(q.a,{},void 0,Object(u.a)(w.a,{}));var o=Object(u.a)(h.b,{id:"empty_column.follow_requests",defaultMessage:"You don't have any follow requests yet. When you receive one, it will show up here."});return Object(u.a)(q.a,{icon:"users",heading:t.formatMessage(U.heading)},void 0,Object(u.a)(y.a,{}),Object(u.a)(T.a,{scrollKey:"follow_requests",onLoadMore:this.handleLoadMore,shouldUpdateScroll:a,emptyMessage:o},void 0,c.map(function(e){return Object(u.a)(S,{id:e},e)})))},e}(O.a),Object(j.a)(r,"propTypes",{params:_.a.object.isRequired,dispatch:_.a.func.isRequired,shouldUpdateScroll:_.a.func,accountIds:g.a.list,intl:_.a.object.isRequired}),i=s))||i)||i}}]);
//# sourceMappingURL=follow_requests.js.map