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

2 lines
18 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{701:function(t,e,i){"use strict";i.r(e);var n,a,o,s,c,l,r,p=i(1),d=i(6),u=i(0),f=i(2),b=i(54),g=i.n(b),h=i(3),O=i.n(h),j=i(20),v=i(431),m=i(429),M=i(76),_=i(206),w=i(155),C=i(5),y=i.n(C),k=i(26),x=i.n(k),N=i(632),P=i(888),I=i(7),F=i(408),H=i(24),S=i(179),R=i(33),T=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(", ")},q=Object(I.g)((o=a=function(a){function t(){for(var n,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n=a.call.apply(a,[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,a);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)(S.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-follow focusable",tabIndex:"0","aria-label":T(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)(R.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)(P.a,{id:e.get("id"),withNote:!1,hidden:this.props.hidden})))},e.renderMention=function(t){return Object(p.a)(N.a,{id:t.get("status"),withDismiss:!0,hidden:this.props.hidden,onMoveDown:this.handleMoveDown,onMoveUp:this.handleMoveUp,contextType:"notifications"})},e.renderFavourite=function(t,e){var i=this.props.intl;return Object(p.a)(S.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)(R.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)(N.a,{id:t.get("status"),account:t.get("account"),muted:!0,withDismiss:!0,hidden:!!this.props.hidden})))},e.renderReblog=function(t,e){var i=this.props.intl;return Object(p.a)(S.HotKeys,{handlers:this.getHandlers()},void
//# sourceMappingURL=notifications.js.map