akkoma/priv/static/packs/features/notifications.js

2 lines
21 KiB
JavaScript
Raw Normal View History

2019-06-26 19:06:28 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{691:function(t,e,i){"use strict";i.r(e);var o,n,a,s,c,l,r,p=i(0),d=i(2),u=i(6),f=i(1),b=i(56),h=i.n(b),g=i(3),O=i.n(g),j=i(21),v=i(633),m=i(628),M=i(85),_=i(222),w=i(200),C=i(5),y=i.n(C),k=i(26),P=i.n(k),x=i(903),N=i(895),S=i(7),I=i(379),F=i(25),W=i(343),H=i(30),T=function(t,e,i){var o=[e];return o.push(t.formatDate(i,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})),o.join(", ")},R=Object(S.g)((a=n=function(n){function t(){for(var o,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return o=n.call.apply(n,[this].concat(e))||this,Object(f.a)(Object(d.a)(o),"handleMoveUp",function(){var t=o.props,e=t.notification;(0,t.onMoveUp)(e.get("id"))}),Object(f.a)(Object(d.a)(o),"handleMoveDown",function(){var t=o.props,e=t.notification;(0,t.onMoveDown)(e.get("id"))}),Object(f.a)(Object(d.a)(o),"handleOpen",function(){var t=o.props.notification;t.get("status")?o.context.router.history.push("/statuses/"+t.get("status")):o.handleOpenProfile()}),Object(f.a)(Object(d.a)(o),"handleOpenProfile",function(){var t=o.props.notification;o.context.router.history.push("/accounts/"+t.getIn(["account","id"]))}),Object(f.a)(Object(d.a)(o),"handleMention",function(t){t.preventDefault();var e=o.props,i=e.notification;(0,e.onMention)(i.get("account"),o.context.router.history)}),Object(f.a)(Object(d.a)(o),"handleHotkeyFavourite",function(){var t=o.props.status;t&&o.props.onFavourite(t)}),Object(f.a)(Object(d.a)(o),"handleHotkeyBoost",function(t){var e=o.props.status;e&&o.props.onReblog(e,t)}),Object(f.a)(Object(d.a)(o),"handleHotkeyToggleHidden",function(){var t=o.props.status;t&&o.props.onToggleHidden(t)}),o}Object(u.a)(t,n);var e=t.prototype;return e.getHandlers=function(){return{reply:this.handleMention,favourite:this.handleHotkeyFavourite,boost:this.handleHotkeyBoost,mention:this.handleMention,open:this.handleOpen,openProfile:this.handleOpenProfile,moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,toggleHidden:this.handleHotkeyToggleHidden}},e.renderFollow=function(t,e,i){var o=this.props.intl;return Object(p.a)(W.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-follow focusable",tabIndex:"0","aria-label":T(o,o.formatMessage({id:"notification.follow",defaultMessage:"{name} followed you"},{name:e.get("acct")}),t.get("created_at"))},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)(H.a,{id:"user-plus",fixedWidth:!0})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(S.b,{id:"notification.follow",defaultMessage:"{name} followed you",values:{name:i}}))),Object(p.a)(N.a,{id:e.get("id"),withNote:!1,hidden:this.props.hidden})))},e.renderMention=function(t){return Object(p.a)(x.a,{id:t.get("status"),withDismiss:!0,hidden:this.props.hidden,onMoveDown:this.handleMoveDown,onMoveUp:this.handleMoveUp,contextType:"notifications",getScrollPosition:this.props.getScrollPosition,updateScrollBottom:this.props.updateScrollBottom,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth})},e.renderFavourite=function(t,e){var i=this.props.intl;return Object(p.a)(W.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-favourite focusable",tabIndex:"0","aria-label":T(i,i.formatMessage({id:"notification.favourite",defaultMessage:"{name} favourited your status"},{name:t.getIn(["account","acct"])}),t.get("created_at"))},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)(H.a,{id:"star",className:"star-icon",fixedWidth:!0})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(S.b,{id:"notification.favourite",defaultMessage:"{name} favourited your status",values:{name:e}}))),Object(p.a)(x.a,{id:t.get("status"),account:t.get("account"),muted:!0,withDismiss:!0,hidden:!!this.props.hidden,getScrollPosition:this.props.getScrollP
//# sourceMappingURL=notifications.js.map