2019-03-07 03:56:02 -07:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{701:function(t,e,n){"use strict";n.r(e);var p=n(1),i=n(7),a=n(0),s=n(2),o=n(54),c=n.n(o),l=n(3),O=n.n(l),r=n(20),j=n(430),m=n(428),f=n(34),u=n(206),d=n(170),b=n(5),h=n.n(b),g=n(26),v=n.n(g),M=n(24),C=n(633),w=n(6),_=n(179),y=n(324),k=n(625),P=n(530),N=function(o){function t(){for(var i,t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i=o.call.apply(o,[this].concat(e))||this,Object(s.a)(Object(a.a)(Object(a.a)(i)),"handleMoveUp",function(){var t=i.props,e=t.notification;(0,t.onMoveUp)(e.get("id"))}),Object(s.a)(Object(a.a)(Object(a.a)(i)),"handleMoveDown",function(){var t=i.props,e=t.notification;(0,t.onMoveDown)(e.get("id"))}),Object(s.a)(Object(a.a)(Object(a.a)(i)),"handleOpen",function(){i.handleOpenProfile()}),Object(s.a)(Object(a.a)(Object(a.a)(i)),"handleOpenProfile",function(){var t=i.props.notification;i.context.router.history.push("/accounts/"+t.getIn(["account","id"]))}),Object(s.a)(Object(a.a)(Object(a.a)(i)),"handleMention",function(t){t.preventDefault();var e=i.props,n=e.notification;(0,e.onMention)(n.get("account"),i.context.router.history)}),i}Object(i.a)(t,o);var e=t.prototype;return e.getHandlers=function(){return{moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,open:this.handleOpen,openProfile:this.handleOpenProfile,mention:this.handleMention,reply:this.handleMention}},e.render=function(){var t=this.props,e=t.account,n=t.notification,i=t.hidden,o=e.get("display_name_html")||e.get("username"),a=Object(p.a)("bdi",{},void 0,Object(p.a)(y.a,{className:"notification__display-name",href:e.get("url"),title:e.get("acct"),to:"/accounts/"+e.get("id"),dangerouslySetInnerHTML:{__html:o}}));return Object(p.a)(_.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-follow focusable",tabIndex:"0"},void 0,Object(p.a)("div",{className:"notification__message"},void 0,Object(p.a)("div",{className:"notification__favourite-icon-wrapper"},void 0,Object(p.a)("i",{className:"fa fa-fw fa-user-plus"})),Object(p.a)(w.b,{id:"notification.follow",defaultMessage:"{name} followed you",values:{name:a}})),Object(p.a)(k.a,{hidden:i,id:e.get("id"),withNote:!1}),Object(p.a)(P.a,{notification:n})))},t}(M.a);Object(s.a)(N,"propTypes",{hidden:h.a.bool,id:h.a.string.isRequired,account:v.a.map.isRequired,notification:v.a.map.isRequired});var I=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.render=function(){var t=this.props,e=t.hidden,n=t.notification,i=t.onMoveDown,o=t.onMoveUp,a=t.onMention,s=t.getScrollPosition,c=t.updateScrollBottom;switch(n.get("type")){case"follow":return Object(p.a)(N,{hidden:e,id:n.get("id"),account:n.get("account"),notification:n,onMoveDown:i,onMoveUp:o,onMention:a});case"mention":return Object(p.a)(C.a,{containerId:n.get("id"),hidden:e,id:n.get("status"),notification:n,onMoveDown:i,onMoveUp:o,onMention:a,contextType:"notifications",getScrollPosition:s,updateScrollBottom:c,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth,onUnmount:this.props.onUnmount,withDismiss:!0});case"favourite":return Object(p.a)(C.a,{containerId:n.get("id"),hidden:e,id:n.get("status"),account:n.get("account"),prepend:"favourite",muted:!0,notification:n,onMoveDown:i,onMoveUp:o,onMention:a,getScrollPosition:s,updateScrollBottom:c,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth,onUnmount:this.props.onUnmount,withDismiss:!0});case"reblog":return Object(p.a)(C.a,{containerId:n.get("id"),hidden:e,id:n.get("status"),account:n.get("account"),prepend:"reblog",muted:!0,notification:n,onMoveDown:i,onMoveUp:o,onMention:a,getScrollPosition:s,updateScrollBottom:c,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth,onUnmount:this.props.onUnmount,withDismiss:!0});default:return null}},e}(M.a);Object(s.a)(I,"propTypes",{notification:v.a.map.isRequired,hidden:h.a.bool,onMoveUp:h.a.func.isRequired,onMoveDown:h.a.func.isRequired,onMention:h.a.func.isRequired,getScrollPosi
|