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

2 lines
3.3 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{701:function(e,t,a){"use strict";a.r(t);var c,o,n,i,r,s,u=a(0),l=a(3),d=a(7),j=a(1),b=(a(2),a(24)),p=a(5),f=a.n(p),O=a(27),h=a.n(O),v=a(271),m=a(426),_=a(624),g=a(629),w=a(204),q=a(318),y=a(102),z=a(103),R=a(48),M=a(6),N=a(25),S=Object(M.f)({authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}}),k=Object(M.g)((n=o=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,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)(q.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:n})),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(S.authorize),icon:"check",onClick:c})),Object(u.a)("div",{className:"account--panel__button"},void 0,Object(u.a)(R.a,{title:t.formatMessage(S.reject),icon:"times",onClick:o}))))},t}(N.a),Object(j.a)(o,"propTypes",{account:h.a.map.isRequired,onAuthorize:f.a.func.isRequired,onReject:f.a.func.isRequired,intl:f.a.object.isRequired}),c=n))||c,A=a(22),I=Object(b.connect)(function(){var a=Object(w.d)();return function(e,t){return{account:a(e,t.id)}}},function(e,t){var a=t.id;return{onAuthorize:function(){e(Object(A.y)(a))},onReject:function(){e(Object(A.P)(a))}}})(k);a.d(t,"default",function(){return C});var T=Object(M.f)({heading:{id:"column.follow_requests",defaultMessage:"Follow requests"}}),C=Object(b.connect)(function(e){return{accountIds:e.getIn(["user_lists","follow_requests","items"])}})(i=Object(M.g)((s=r=function(o){function e(){for(var a,e=arguments.length,t=new Array(e),c=0;c<e;c++)t[c]=arguments[c];return a=o.call.apply(o,[this].concat(t))||this,Object(j.a)(Object(l.a)(a),"handleScroll",function(e){var t=e.target;t.scrollTop===t.scrollHeight-t.clientHeight&&a.props.dispatch(Object(A.C)())}),Object(j.a)(Object(l.a)(a),"shouldUpdateScroll",function(e,t){var a=t.location;return!(((e||{}).location||{}).state||{}).mastodonModalOpen&&!(a.state&&a.state.mastodonModalOpen)}),a}Object(d.a)(e,o);var t=e.prototype;return t.componentWillMount=function(){this.props.dispatch(Object(A.G)())},t.render=function(){var e=this.props,t=e.intl,a=e.accountIds;return a?Object(u.a)(_.a,{name:"follow-requests",icon:"users",heading:t.formatMessage(T.heading)},void 0,Object(u.a)(g.a,{}),Object(u.a)(m.a,{scrollKey:"follow_requests",shouldUpdateScroll:this.shouldUpdateScroll},void 0,Object(u.a)("div",{className:"scrollable",onScroll:this.handleScroll},void 0,a.map(function(e){return Object(u.a)(I,{id:e},e)})))):Object(u.a)(_.a,{name:"follow-requests"},void 0,Object(u.a)(v.a,{}))},e}(N.a),Object(j.a)(r,"propTypes",{params:f.a.object.isRequired,dispatch:f.a.func.isRequired,accountIds:h.a.list,intl:f.a.object.isRequired}),i=s))||i)||i}}]);
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=follow_requests.js.map