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

2 lines
17 KiB
JavaScript
Raw Normal View History

2018-09-16 21:17:34 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{700:function(t,e,i){"use strict";i.r(e);var n,a,o,s,c,l,r,p=i(1),f=i(6),u=i(0),d=i(2),b=i(53),g=i.n(b),h=i(3),O=i.n(h),j=i(20),v=i(430),m=i(428),w=i(75),M=i(203),_=i(154),C=i(5),y=i.n(C),N=i(26),k=i.n(N),P=i(631),I=i(887),x=i(7),F=i(407),S=i(24),D=i(176),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(", ")},U=Object(x.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(d.a)(Object(u.a)(Object(u.a)(n)),"handleMoveUp",function(){var t=n.props,e=t.notification;(0,t.onMoveUp)(e.get("id"))}),Object(d.a)(Object(u.a)(Object(u.a)(n)),"handleMoveDown",function(){var t=n.props,e=t.notification;(0,t.onMoveDown)(e.get("id"))}),Object(d.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(d.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(d.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)}),n}Object(f.a)(t,a);var e=t.prototype;return e.getHandlers=function(){return{moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,open:this.handleOpen,openProfile:this.handleOpenProfile,mention:this.handleMention,reply:this.handleMention}},e.renderFollow=function(t,e,i){var n=this.props.intl;return Object(p.a)(D.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)("i",{className:"fa fa-fw fa-user-plus"})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(x.b,{id:"notification.follow",defaultMessage:"{name} followed you",values:{name:i}}))),Object(p.a)(I.a,{id:e.get("id"),withNote:!1,hidden:this.props.hidden})))},e.renderMention=function(t){return Object(p.a)(P.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)(D.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)("i",{className:"fa fa-fw fa-star star-icon"})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(x.b,{id:"notification.favourite",defaultMessage:"{name} favourited your status",values:{name:e}}))),Object(p.a)(P.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)(D.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-reblog focusable",tabIndex:"0","aria-label":T(i,i.formatMessage({id:"notification.reblog",defaultMessage:"{name} boosted 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)("i",{className:"fa fa-fw fa-retweet"})),Object(p.a)("span",{title:t.get("created_at")
//# sourceMappingURL=notifications.js.map