spc-pleroma/priv/static/packs/flavours/glitch/async/notifications.js

2 lines
19 KiB
JavaScript
Raw Normal View History

2020-01-22 15:00:23 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[75],{738:function(t,e,n){"use strict";n.r(e);var i=n(0),o=n(2),a=n(7),s=n(1),c=n(63),l=n.n(c),r=n(3),d=n.n(r),u=n(12),f=n(667),h=n(664),b=n(43),g=n(243),p=n(148),O=n(5),j=n.n(O),m=n(18),v=n.n(m),M=n(19),C=n(999),w=n(6),_=n(287),P=n(218),y=n(459),k=n(686),I=n(25),x=function(t){function e(){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}Object(a.a)(e,t);var n=e.prototype;return n.getHandlers=function(){return{moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,open:this.handleOpen,openProfile:this.handleOpenProfile,mention:this.handleMention,reply:this.handleMention}},n.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)(P.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)(_.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)(I.a,{fixedWidth:!0,id:"user-plus"})),Object(i.a)(w.b,{id:"notification.follow",defaultMessage:"{name} followed you",values:{name:s}})),Object(i.a)(y.a,{hidden:o,id:e.get("id"),withNote:!1}),Object(i.a)(k.a,{notification:n})))},e}(M.a);Object(s.a)(x,"propTypes",{hidden:j.a.bool,id:j.a.string.isRequired,account:v.a.map.isRequired,notification:v.a.map.isRequired});var N=function(t){function e(){return t.apply(this,arguments)||this}return Object(a.a)(e,t),e.prototype.render=function(){var t=this.props,e=t.hidden,n=t.notification,o=t.onMoveDown,a=t.onMoveUp,s=t.onMention,c=t.getScrollPosition,l=t.updateScrollBottom;switch(n.get("type")){case"follow":return Object(i.a)(x,{hidden:e,id:n.get("id"),account:n.get("account"),notification:n,onMoveDown:o,onMoveUp:a,onMention:s});case"mention":return Object(i.a)(C.a,{containerId:n.get("id"),hidden:e,id:n.get("status"),notification:n,onMoveDown:o,onMoveUp:a,onMention:s,contextType:"notifications",getScrollPosition:c,updateScrollBottom:l,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth,onUnmount:this.props.onUnmount,withDismiss:!0});case"favourite":return Object(i.a)(C.a,{containerId:n.get("id"),hidden:e,id:n.get("status"),account:n.get("account"),prepend:"favourite",muted:!0,notification:n,onMoveDown:o,onMoveUp:a,onMention:s,getScrollPosition:c,updateScrollBottom:l,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth,onUnmount:this.props.onUnmount,withDismiss:!0});case"reblog":return Object(i.a)(C.a,{containerId:n.get("id"),hidden:e,id:n.get("status"),account:n.get("account"),prepend:"reblog",muted:!0,notification:n,onMoveDown:o,onMoveUp:a,onMention:s,getScrollPosition:c,updateScrollBottom:l,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth,onUnmount:this.props.onUnmount,withDismiss:!0});case"poll":return Object(i.a)(C.a,{containerId:n.get("id"),hidden:e,id:n.get("status"),account:n.get("account"),prepend:"poll",muted:!0,notification:n,onMoveDown:o,onMoveUp:a,onMention:s,getScrollPosition:c,updateScrollBottom:l,cachedMediaWidth:this.props.cachedMediaWid
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=notifications.js.map