distraction.party/priv/static/packs/features/notifications.js

2 lines
19 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{702:function(t,e,i){"use strict";i.r(e);var n,o,a,s,c,l,r,p=i(1),d=i(7),u=i(0),f=i(2),b=i(54),h=i.n(b),g=i(3),O=i.n(g),j=i(20),v=i(431),m=i(429),M=i(79),_=i(207),w=i(156),C=i(5),y=i.n(C),k=i(26),P=i.n(k),x=i(632),N=i(896),I=i(6),S=i(408),F=i(24),H=i(179),W=i(33),R=function(t,e,i){var n=[e];return n.push(t.formatDate(i,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})),n.join(", ")},T=Object(I.g)((a=o=function(o){function t(){for(var n,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n=o.call.apply(o,[this].concat(e))||this,Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMoveUp",function(){var t=n.props,e=t.notification;(0,t.onMoveUp)(e.get("id"))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMoveDown",function(){var t=n.props,e=t.notification;(0,t.onMoveDown)(e.get("id"))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleOpen",function(){var t=n.props.notification;t.get("status")?n.context.router.history.push("/statuses/"+t.get("status")):n.handleOpenProfile()}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleOpenProfile",function(){var t=n.props.notification;n.context.router.history.push("/accounts/"+t.getIn(["account","id"]))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMention",function(t){t.preventDefault();var e=n.props,i=e.notification;(0,e.onMention)(i.get("account"),n.context.router.history)}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleHotkeyFavourite",function(){var t=n.props.status;t&&n.props.onFavourite(t)}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleHotkeyBoost",function(t){var e=n.props.status;e&&n.props.onReblog(e,t)}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleHotkeyToggleHidden",function(){var t=n.props.status;t&&n.props.onToggleHidden(t)}),n}Object(d.a)(t,o);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 n=this.props.intl;return Object(p.a)(H.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-follow focusable",tabIndex:"0","aria-label":R(n,n.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)(W.a,{id:"user-plus",fixedWidth:!0})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(I.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)(H.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-favourite focusable",tabIndex:"0","aria-label":R(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)(W.a,{id:"star",className:"star-icon",fixedWidth:!0})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(I.b,{id:"notification.favourite",defaultMessage:"{name} favourited your status",values:{name:e}}))),Object(p.a)(x.a,{id:t.get("status"),account:t.g
//# sourceMappingURL=notifications.js.map