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

2 lines
21 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{690:function(t,e,i){"use strict";i.r(e);var o,n,a,s,c,l,r,p=i(0),d=i(3),u=i(7),f=i(1),b=i(56),h=i.n(b),g=i(2),O=i.n(g),j=i(24),v=i(631),m=i(627),M=i(85),_=i(223),w=i(199),C=i(5),y=i.n(C),k=i(27),P=i.n(k),x=i(897),N=i(891),S=i(6),I=i(378),F=i(25),W=i(344),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