2019-02-10 10:55:22 -08:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{700:function(t,e,n){"use strict";n.r(e);var p=n(1),i=n(6),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),v=n(428),f=n(34),u=n(205),d=n(169),b=n(5),g=n.n(b),h=n(26),m=n.n(h),M=n(24),C=n(633),w=n(7),_=n(179),y=n(321),k=n(625),P=n(529),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:g.a.bool,id:g.a.string.isRequired,account:m.a.map.isRequired,notification:m.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,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,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,withDismiss:!0});default:return null}},e}(M.a);Object(s.a)(I,"propTypes",{notification:m.a.map.isRequired,hidden:g.a.bool,onMoveUp:g.a.func.isRequired,onMoveDown:g.a.func.isRequired,onMention:g.a.func.isRequired,getScrollPosition:g.a.func,updateScrollBottom:g.a.func});var S,x,U,D,F=n(19),q=Object(r.connect)(function(){var n=Object(d.e)();return function(t,e){return{notification:n(t,e.notification,e.accountId),notifCleaning:t.getIn(["notifications","cleaningMode"])}}},function(n){return{onMention:function(t,e){n(Object(F.U)(t,e))}}})(I),T=function(t){function e(){return t.appl
|