pleroma/priv/static/packs/features/notifications.js

2 lines
25 KiB
JavaScript
Raw Normal View History

2020-02-28 21:41:13 -08:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{808:function(t,e,i){"use strict";i.r(e);var o,a,n,s,c,l,r,d,u,f,b=i(0),h=i(2),g=i(7),p=i(1),O=i(62),j=i.n(O),v=i(3),m=i.n(v),_=i(13),M=i(736),w=i(733),C=i(53),y=i(250),P=i(206),k=i(14),N=i.n(k),x=i(6),I=i(295),q=i(5),S=i.n(q),F=i(18),R=i(20),W=i(1053),H=i(1026),T=i(111),D=i(118),L=i(294),B=i(50),U=Object(x.f)({authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}}),A=Object(x.g)((n=a=function(t){function e(){return t.apply(this,arguments)||this}return Object(g.a)(e,t),e.prototype.render=function(){var t=this.props,e=t.intl,i=t.hidden,o=t.account,a=t.onAuthorize,n=t.onReject;return o?i?Object(b.a)(v.Fragment,{},void 0,o.get("display_name"),o.get("username")):Object(b.a)("div",{className:"account"},void 0,Object(b.a)("div",{className:"account__wrapper"},void 0,Object(b.a)(L.a,{className:"account__display-name",title:o.get("acct"),href:o.get("url"),to:"/accounts/"+o.get("id")},o.get("id"),Object(b.a)("div",{className:"account__avatar-wrapper"},void 0,Object(b.a)(T.a,{account:o,size:36})),Object(b.a)(D.a,{account:o})),Object(b.a)("div",{className:"account__relationship"},void 0,Object(b.a)(B.a,{title:e.formatMessage(U.authorize),icon:"check",onClick:a}),Object(b.a)(B.a,{title:e.formatMessage(U.reject),icon:"times",onClick:n})))):Object(b.a)("div",{})},e}(F.a),Object(p.a)(a,"propTypes",{account:N.a.map.isRequired,onAuthorize:S.a.func.isRequired,onReject:S.a.func.isRequired,intl:S.a.object.isRequired}),o=n))||o,z=i(25),K=Object(_.connect)((function(){var t=Object(P.d)();return function(e,i){return{account:t(e,i.id)}}}),(function(t,e){var i=e.id;return{onAuthorize:function(){t(Object(z.v)(i))},onReject:function(){t(Object(z.I)(i))}}}))(A),Y=i(26),G=Object(x.f)({favourite:{id:"notification.favourite",defaultMessage:"{name} favourited your status"},follow:{id:"notification.follow",defaultMessage:"{name} followed you"},ownPoll:{id:"notification.own_poll",defaultMessage:"Your poll has ended"},poll:{id:"notification.poll",defaultMessage:"A poll you have voted in has ended"},reblog:{id:"notification.reblog",defaultMessage:"{name} boosted your status"}}),J=function(t,e,i){var o=[e];return o.push(t.formatDate(i,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})),o.join(", ")},V=Object(x.g)((l=c=function(t){function e(){for(var e,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o))||this,Object(p.a)(Object(h.a)(e),"handleMoveUp",(function(){var t=e.props,i=t.notification;(0,t.onMoveUp)(i.get("id"))})),Object(p.a)(Object(h.a)(e),"handleMoveDown",(function(){var t=e.props,i=t.notification;(0,t.onMoveDown)(i.get("id"))})),Object(p.a)(Object(h.a)(e),"handleOpen",(function(){var t=e.props.notification;t.get("status")?e.context.router.history.push("/statuses/"+t.get("status")):e.handleOpenProfile()})),Object(p.a)(Object(h.a)(e),"handleOpenProfile",(function(){var t=e.props.notification;e.context.router.history.push("/accounts/"+t.getIn(["account","id"]))})),Object(p.a)(Object(h.a)(e),"handleMention",(function(t){t.preventDefault();var i=e.props,o=i.notification;(0,i.onMention)(o.get("account"),e.context.router.history)})),Object(p.a)(Object(h.a)(e),"handleHotkeyFavourite",(function(){var t=e.props.status;t&&e.props.onFavourite(t)})),Object(p.a)(Object(h.a)(e),"handleHotkeyBoost",(function(t){var i=e.props.status;i&&e.props.onReblog(i,t)})),Object(p.a)(Object(h.a)(e),"handleHotkeyToggleHidden",(function(){var t=e.props.status;t&&e.props.onToggleHidden(t)})),e}Object(g.a)(e,t);var i=e.prototype;return i.getHandlers=function(){return{reply:this.handleMention,favourite:this.handleHotkeyFavourite,boost:this.handleHotkeyBoost,mention:this.handleMention,open:this.handleOpen,openProfile:this.handleOpenProfile,moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,toggleHidden:this.handleHotkeyToggleHidden}},i.renderFollow=function(t,e,i){var o=this.props.intl;return Object(b.a)(I.HotKeys,{handlers:this.getHandlers()},void 0,Object(b.a)("div",{className:"no
//# sourceMappingURL=notifications.js.map