2019-06-26 15:06:28 -04:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{690:function(t,e,n){"use strict";n.r(e);var p=n(0),a=n(2),i=n(6),s=n(1),o=n(56),c=n.n(o),l=n(3),O=n.n(l),r=n(21),j=n(632),m=n(627),d=n(41),f=n(221),u=n(191),b=n(5),h=n.n(b),g=n(26),v=n.n(g),M=n(25),C=n(911),w=n(7),_=n(343),y=n(317),P=n(630),k=n(645),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)(i),"handleMoveUp",function(){var t=i.props,e=t.notification;(0,t.onMoveUp)(e.get("id"))}),Object(s.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)(i),"handleOpen",function(){i.handleOpenProfile()}),Object(s.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)(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)(P.a,{hidden:i,id:e.get("id"),withNote:!1}),Object(p.a)(k.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});case"poll":return Object(p.a)(C.a,{containerId:n.get("id"),hidden:e,id:n.get("status"),account:n.get("account"),prepend:"poll",muted:!0,notification:n,onMoveDown:i,onMoveUp:o,onMention:a,getScrollPosition:s,updateScrollBottom:c,cachedMediaWidth:this.props.cachedMediaWidth,
|