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

2 lines
25 KiB
JavaScript
Raw Normal View History

2020-05-20 05:55:14 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{834:function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return pt}));var o,a,n,s=i(0),c=i(2),l=(i(9),i(6),i(8)),r=i(1),d=i(65),u=i.n(d),f=i(3),b=i.n(f),h=i(15),g=i(762),p=i(759),O=i(55),j=i(253),v=i(210),m=i(16),_=i.n(m),M=i(7),w=i(301),C=i(5),y=i.n(C),P=i(21),k=i(22),N=i(1080),x=i(1053),I=i(115),q=i(122),S=i(300),F=i(53);var R,W,H,T=Object(M.f)({authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}}),D=Object(M.g)((n=a=function(t){Object(l.a)(i,t);var e;e=i;function i(){return t.apply(this,arguments)||this}return i.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(s.a)(f.Fragment,{},void 0,o.get("display_name"),o.get("username")):Object(s.a)("div",{className:"account"},void 0,Object(s.a)("div",{className:"account__wrapper"},void 0,Object(s.a)(S.a,{className:"account__display-name",title:o.get("acct"),href:o.get("url"),to:"/accounts/"+o.get("id")},o.get("id"),Object(s.a)("div",{className:"account__avatar-wrapper"},void 0,Object(s.a)(I.a,{account:o,size:36})),Object(s.a)(q.a,{account:o})),Object(s.a)("div",{className:"account__relationship"},void 0,Object(s.a)(F.a,{title:e.formatMessage(T.authorize),icon:"check",onClick:a}),Object(s.a)(F.a,{title:e.formatMessage(T.reject),icon:"times",onClick:n})))):Object(s.a)("div",{})},i}(P.a),Object(r.a)(a,"propTypes",{account:_.a.map.isRequired,onAuthorize:y.a.func.isRequired,onReject:y.a.func.isRequired,intl:y.a.object.isRequired}),o=n))||o,L=i(26),B=Object(h.connect)((function(){var t=Object(v.d)();return function(e,i){return{account:t(e,i.id)}}}),(function(t,e){var i=e.id;return{onAuthorize:function(){t(Object(L.v)(i))},onReject:function(){t(Object(L.I)(i))}}}))(D),U=i(27);var A=Object(M.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"}}),z=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(", ")},K=Object(M.g)((H=W=function(t){Object(l.a)(i,t);var e;e=i;function i(){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(r.a)(Object(c.a)(e),"handleMoveUp",(function(){var t=e.props,i=t.notification;(0,t.onMoveUp)(i.get("id"))})),Object(r.a)(Object(c.a)(e),"handleMoveDown",(function(){var t=e.props,i=t.notification;(0,t.onMoveDown)(i.get("id"))})),Object(r.a)(Object(c.a)(e),"handleOpen",(function(){var t=e.props.notification;t.get("status")?e.context.router.history.push("/statuses/"+t.get("status")):e.handleOpenProfile()})),Object(r.a)(Object(c.a)(e),"handleOpenProfile",(function(){var t=e.props.notification;e.context.router.history.push("/accounts/"+t.getIn(["account","id"]))})),Object(r.a)(Object(c.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(r.a)(Object(c.a)(e),"handleHotkeyFavourite",(function(){var t=e.props.status;t&&e.props.onFavourite(t)})),Object(r.a)(Object(c.a)(e),"handleHotkeyBoost",(function(t){var i=e.props.status;i&&e.props.onReblog(i,t)})),Object(r.a)(Object(c.a)(e),"handleHotkeyToggleHidden",(function(){var t=e.props.status;t&&e.props.onToggleHidden(t)})),e}var o=i.prototype;return o.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}},o.renderFollow=function(t,e,i){var o=this.props.intl;return(Object(s.a)(w.HotK
//# sourceMappingURL=notifications.js.map