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

2 lines
3.9 KiB
JavaScript
Raw Normal View History

2020-05-20 01:55:14 -04:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{846:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return J}));var o,n,c,i=a(0),s=a(2),u=(a(9),a(6),a(8)),r=a(1),l=a(65),d=a.n(l),b=(a(3),a(15)),f=a(5),j=a.n(f),p=a(16),h=a.n(p),m=a(305),O=a(756),v=a(761),_=a(108),g=a(214),w=a(96),q=a(98),y=a(41),M=a(7),k=a(21);var z,R,N,I=Object(M.f)({authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}}),A=Object(M.g)((c=n=function(e){Object(u.a)(a,e);var t;t=a;function a(){return e.apply(this,arguments)||this}return a.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(i.a)("div",{className:"account-authorize__wrapper"},void 0,Object(i.a)("div",{className:"account-authorize"},void 0,Object(i.a)(g.a,{href:a.get("url"),to:"/accounts/"+a.get("id"),className:"detailed-status__display-name"},void 0,Object(i.a)("div",{className:"account-authorize__avatar"},void 0,Object(i.a)(w.a,{account:a,size:48})),Object(i.a)(q.a,{account:a})),Object(i.a)("div",{className:"account__header__content",dangerouslySetInnerHTML:c})),Object(i.a)("div",{className:"account--panel"},void 0,Object(i.a)("div",{className:"account--panel__button"},void 0,Object(i.a)(y.a,{title:t.formatMessage(I.authorize),icon:"check",onClick:o})),Object(i.a)("div",{className:"account--panel__button"},void 0,Object(i.a)(y.a,{title:t.formatMessage(I.reject),icon:"times",onClick:n}))))},a}(k.a),Object(r.a)(n,"propTypes",{account:h.a.map.isRequired,onAuthorize:j.a.func.isRequired,onReject:j.a.func.isRequired,intl:j.a.object.isRequired}),o=c))||o,C=a(24),T=Object(b.connect)((function(){var e=Object(_.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(1048),x=a(18);var D=Object(M.f)({heading:{id:"column.follow_requests",defaultMessage:"Follow requests"}}),J=Object(b.connect)((function(e){return{accountIds:e.getIn(["user_lists","follow_requests","items"]),hasMore:!!e.getIn(["user_lists","follow_requests","next"]),locked:!!e.getIn(["accounts",x.m,"locked"]),domain:e.getIn(["meta","domain"])}}))(z=Object(M.g)((N=R=function(e){Object(u.a)(a,e);var t;t=a;function a(){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(r.a)(Object(s.a)(t),"handleLoadMore",d()((function(){t.props.dispatch(Object(C.C)())}),300,{leading:!0})),t}var o=a.prototype;return o.componentWillMount=function(){this.props.dispatch(Object(C.G)())},o.render=function(){var e=this.props,t=e.intl,a=e.accountIds,o=e.hasMore,n=e.multiColumn,c=e.locked,s=e.domain;if(!a)return Object(i.a)(O.a,{name:"follow-requests"},void 0,Object(i.a)(m.a,{}));var u=Object(i.a)(M.b,{id:"empty_column.follow_requests",defaultMessage:"You don't have any follow requests yet. When you receive one, it will show up here."}),r=c?null:Object(i.a)("div",{className:"follow_requests-unlocked_explanation"},void 0,Object(i.a)(M.b,{id:"follow_requests.unlocked_explanation",defaultMessage:"Even though your account is not locked, the {domain} staff thought you might want to review follow requests from these accounts manually.",values:{domain:s}}));return Object(i.a)(O.a,{bindToDocument:!n,name:"follow-requests",icon:"user-plus",heading:t.formatMessage(D.heading)},void 0,Object(i.a)(v.a,{}),Object(i.a)(L.a,{scrollKey:"follow_requests",onLoadMore:this.handleLoadMore,hasMore:o,emptyMessage:u,bindToDocument:!n,prepend:r},void 0,a.map((function(e){return Object(i.a)(T,{id:e},e)}))))},a}(k.a),Object(r.a)(R,"propTypes",{params:j.a.object.isRequired,dispatch:j.a.func.isRequired,hasMore:j.a.bool,accountIds:h.a.list,locked:j.a.bool,domain:j.a.string,intl:j.a.object.isRequired,multiColumn:j.a.bool}),z=N))||z)||z}}]);
2018-09-16 17:17:34 -04:00
//# sourceMappingURL=follow_requests.js.map