spc-pleroma/priv/static/packs/features/notifications.js

2 lines
21 KiB
JavaScript
Raw Normal View History

2020-01-22 15:00:23 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{739:function(t,e,i){"use strict";i.r(e);var o,n,a,s,c,l,r,d=i(0),u=i(2),f=i(7),b=i(1),h=i(63),g=i.n(h),p=i(3),O=i.n(p),j=i(12),v=i(669),m=i(665),M=i(62),_=i(245),w=i(204),C=i(5),y=i.n(C),P=i(18),k=i.n(P),x=i(993),N=i(966),I=i(6),S=i(286),W=i(19),F=i(287),T=i(27),H=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(", ")},D=Object(I.g)((a=n=function(t){function e(){for(var e,i=arguments.length,o=new Array(i),n=0;n<i;n++)o[n]=arguments[n];return e=t.call.apply(t,[this].concat(o))||this,Object(b.a)(Object(u.a)(e),"handleMoveUp",function(){var t=e.props,i=t.notification;(0,t.onMoveUp)(i.get("id"))}),Object(b.a)(Object(u.a)(e),"handleMoveDown",function(){var t=e.props,i=t.notification;(0,t.onMoveDown)(i.get("id"))}),Object(b.a)(Object(u.a)(e),"handleOpen",function(){var t=e.props.notification;t.get("status")?e.context.router.history.push("/statuses/"+t.get("status")):e.handleOpenProfile()}),Object(b.a)(Object(u.a)(e),"handleOpenProfile",function(){var t=e.props.notification;e.context.router.history.push("/accounts/"+t.getIn(["account","id"]))}),Object(b.a)(Object(u.a)(e),"handleMention",function(t){t.preventDefault();var i=e.props,o=i.notification;(0,i.onMention)(o.get("account"),e.context.router.history)}),Object(b.a)(Object(u.a)(e),"handleHotkeyFavourite",function(){var t=e.props.status;t&&e.props.onFavourite(t)}),Object(b.a)(Object(u.a)(e),"handleHotkeyBoost",function(t){var i=e.props.status;i&&e.props.onReblog(i,t)}),Object(b.a)(Object(u.a)(e),"handleHotkeyToggleHidden",function(){var t=e.props.status;t&&e.props.onToggleHidden(t)}),e}Object(f.a)(e,t);var i=e.prototype;return i.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}},i.renderFollow=function(t,e,i){var o=this.props.intl;return Object(d.a)(F.HotKeys,{handlers:this.getHandlers()},void 0,Object(d.a)("div",{className:"notification notification-follow focusable",tabIndex:"0","aria-label":H(o,o.formatMessage({id:"notification.follow",defaultMessage:"{name} followed you"},{name:e.get("acct")}),t.get("created_at"))},void 0,Object(d.a)("div",{className:"notification__message"},void 0,Object(d.a)("div",{className:"notification__favourite-icon-wrapper"},void 0,Object(d.a)(T.a,{id:"user-plus",fixedWidth:!0})),Object(d.a)("span",{title:t.get("created_at")},void 0,Object(d.a)(I.b,{id:"notification.follow",defaultMessage:"{name} followed you",values:{name:i}}))),Object(d.a)(N.a,{id:e.get("id"),withNote:!1,hidden:this.props.hidden})))},i.renderMention=function(t){return Object(d.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})},i.renderFavourite=function(t,e){var i=this.props.intl;return Object(d.a)(F.HotKeys,{handlers:this.getHandlers()},void 0,Object(d.a)("div",{className:"notification notification-favourite focusable",tabIndex:"0","aria-label":H(i,i.formatMessage({id:"notification.favourite",defaultMessage:"{name} favourited your status"},{name:t.getIn(["account","acct"])}),t.get("created_at"))},void 0,Object(d.a)("div",{className:"notification__message"},void 0,Object(d.a)("div",{className:"notification__favourite-icon-wrapper"},void 0,Object(d.a)(T.a,{id:"star",className:"star-icon",fixedWidth:!0})),Object(d.a)("span",{title:t.get("created_at")},void 0,Object(d.a)(I.b,{id:"notification.favourite",defaultMessage:"{name} favourited your status",values:{name:e}}))),Object(d.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