pleroma/priv/static/packs/flavours/glitch/async/follow_requests.js

2 lines
3.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{819:function(e,t,a){"use strict";a.r(t);var o,n,c,i,r,s,u=a(0),l=a(2),d=a(7),b=a(1),j=a(62),f=a.n(j),p=(a(3),a(13)),h=a(5),O=a.n(h),m=a(14),v=a.n(m),_=a(299),g=a(730),w=a(735),q=a(103),M=a(210),y=a(91),z=a(93),R=a(39),N=a(6),I=a(18),k=Object(N.f)({authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}}),A=Object(N.g)((c=n=function(e){function t(){return e.apply(this,arguments)||this}return Object(d.a)(t,e),t.prototype.render=function(){var e=this.props,t=e.intl,a=e.account,o=e.onAuthorize,n=e.onReject,c={__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)(M.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)(y.a,{account:a,size:48})),Object(u.a)(z.a,{account:a})),Object(u.a)("div",{className:"account__header__content",dangerouslySetInnerHTML:c})),Object(u.a)("div",{className:"account--panel"},void 0,Object(u.a)("div",{className:"account--panel__button"},void 0,Object(u.a)(R.a,{title:t.formatMessage(k.authorize),icon:"check",onClick:o})),Object(u.a)("div",{className:"account--panel__button"},void 0,Object(u.a)(R.a,{title:t.formatMessage(k.reject),icon:"times",onClick:n}))))},t}(I.a),Object(b.a)(n,"propTypes",{account:v.a.map.isRequired,onAuthorize:O.a.func.isRequired,onReject:O.a.func.isRequired,intl:O.a.object.isRequired}),o=c))||o,C=a(22),T=Object(p.connect)((function(){var e=Object(q.d)();return function(t,a){return{account:e(t,a.id)}}}),(function(e,t){var a=t.id;return{onAuthorize:function(){e(Object(C.y)(a))},onReject:function(){e(Object(C.P)(a))}}}))(A),L=a(1022);a.d(t,"default",(function(){return J}));var D=Object(N.f)({heading:{id:"column.follow_requests",defaultMessage:"Follow requests"}}),J=Object(p.connect)((function(e){return{accountIds:e.getIn(["user_lists","follow_requests","items"]),hasMore:!!e.getIn(["user_lists","follow_requests","next"])}}))(i=Object(N.g)((s=r=function(e){function t(){for(var t,a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return t=e.call.apply(e,[this].concat(o))||this,Object(b.a)(Object(l.a)(t),"handleLoadMore",f()((function(){t.props.dispatch(Object(C.C)())}),300,{leading:!0})),t}Object(d.a)(t,e);var a=t.prototype;return a.componentWillMount=function(){this.props.dispatch(Object(C.G)())},a.render=function(){var e=this.props,t=e.intl,a=e.accountIds,o=e.hasMore,n=e.multiColumn;if(!a)return Object(u.a)(g.a,{name:"follow-requests"},void 0,Object(u.a)(_.a,{}));var c=Object(u.a)(N.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)(g.a,{bindToDocument:!n,name:"follow-requests",icon:"user-plus",heading:t.formatMessage(D.heading)},void 0,Object(u.a)(w.a,{}),Object(u.a)(L.a,{scrollKey:"follow_requests",onLoadMore:this.handleLoadMore,hasMore:o,emptyMessage:c,bindToDocument:!n},void 0,a.map((function(e){return Object(u.a)(T,{id:e},e)}))))},t}(I.a),Object(b.a)(r,"propTypes",{params:O.a.object.isRequired,dispatch:O.a.func.isRequired,hasMore:O.a.bool,accountIds:v.a.list,intl:O.a.object.isRequired,multiColumn:O.a.bool}),i=s))||i)||i}}]);
//# sourceMappingURL=follow_requests.js.map