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

2 lines
26 KiB
JavaScript
Raw Normal View History

2020-05-20 05:55:14 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{833:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return vt}));var i=n(0),o=n(2),a=(n(9),n(6),n(8)),s=n(1),c=n(65),l=n.n(c),r=n(3),d=n.n(r),u=n(15),f=n(14),b=n.n(f),h=n(760),g=n(758),p=n(43),O=n(252),j=n(108),v=n(5),m=n.n(v),M=n(16),_=n.n(M),C=n(21),w=n(1085),y=n(7),N=n(301),k=n(214),P=n(471),I=n(771),x=n(25);var D=function(t){Object(a.a)(n,t);var e;e=n;function n(){for(var e,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i))||this,Object(s.a)(Object(o.a)(e),"handleMoveUp",(function(){var t=e.props,n=t.notification;(0,t.onMoveUp)(n.get("id"))})),Object(s.a)(Object(o.a)(e),"handleMoveDown",(function(){var t=e.props,n=t.notification;(0,t.onMoveDown)(n.get("id"))})),Object(s.a)(Object(o.a)(e),"handleOpen",(function(){e.handleOpenProfile()})),Object(s.a)(Object(o.a)(e),"handleOpenProfile",(function(){var t=e.props.notification;e.context.router.history.push("/accounts/"+t.getIn(["account","id"]))})),Object(s.a)(Object(o.a)(e),"handleMention",(function(t){t.preventDefault();var n=e.props,i=n.notification;(0,n.onMention)(i.get("account"),e.context.router.history)})),e}var c=n.prototype;return c.getHandlers=function(){return{moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,open:this.handleOpen,openProfile:this.handleOpenProfile,mention:this.handleMention,reply:this.handleMention}},c.render=function(){var t=this.props,e=t.account,n=t.notification,o=t.hidden,a=e.get("display_name_html")||e.get("username"),s=Object(i.a)("bdi",{},void 0,Object(i.a)(k.a,{className:"notification__display-name",href:e.get("url"),title:e.get("acct"),to:"/accounts/"+e.get("id"),dangerouslySetInnerHTML:{__html:a}}));return Object(i.a)(N.HotKeys,{handlers:this.getHandlers()},void 0,Object(i.a)("div",{className:"notification notification-follow focusable",tabIndex:"0"},void 0,Object(i.a)("div",{className:"notification__message"},void 0,Object(i.a)("div",{className:"notification__favourite-icon-wrapper"},void 0,Object(i.a)(x.a,{fixedWidth:!0,id:"user-plus"})),Object(i.a)(y.b,{id:"notification.follow",defaultMessage:"{name} followed you",values:{name:s}})),Object(i.a)(P.a,{hidden:o,id:e.get("id"),withNote:!1}),Object(i.a)(I.a,{notification:n})))},n}(C.a);Object(s.a)(D,"propTypes",{hidden:m.a.bool,id:m.a.string.isRequired,account:_.a.map.isRequired,notification:_.a.map.isRequired});var q,S,U,A=n(96),T=n(98),W=n(41);var F=Object(y.f)({authorize:{id:"follow_request.authorize",defaultMessage:"Authorize"},reject:{id:"follow_request.reject",defaultMessage:"Reject"}}),R=Object(y.g)((U=S=function(t){Object(a.a)(n,t);var e;e=n;function n(){for(var e,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i))||this,Object(s.a)(Object(o.a)(e),"handleMoveUp",(function(){var t=e.props,n=t.notification;(0,t.onMoveUp)(n.get("id"))})),Object(s.a)(Object(o.a)(e),"handleMoveDown",(function(){var t=e.props,n=t.notification;(0,t.onMoveDown)(n.get("id"))})),Object(s.a)(Object(o.a)(e),"handleOpen",(function(){e.handleOpenProfile()})),Object(s.a)(Object(o.a)(e),"handleOpenProfile",(function(){var t=e.props.notification;e.context.router.history.push("/accounts/"+t.getIn(["account","id"]))})),Object(s.a)(Object(o.a)(e),"handleMention",(function(t){t.preventDefault();var n=e.props,i=n.notification;(0,n.onMention)(i.get("account"),e.context.router.history)})),e}var c=n.prototype;return c.getHandlers=function(){return{moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,open:this.handleOpen,openProfile:this.handleOpenProfile,mention:this.handleMention,reply:this.handleMention}},c.render=function(){var t=this.props,e=t.intl,n=t.hidden,o=t.account,a=t.onAuthorize,s=t.onReject,c=t.notification;if(!o)return Object(i.a)("div",{});if(n)return Object(i.a)(r.Fragment,{},void 0,o.get("display_name"),o.get("username"));var l=o.get("display_name_html")||o.get("username"),d=Object(i.a)("bdi",{},void 0,Object(i.a)(k.a,{className:"notification__display-name",href:o.get("url"),title:o.get("acct"),to:"/accounts/"+o.get("i
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=notifications.js.map