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

2 lines
10 KiB
JavaScript
Raw Normal View History

2020-02-29 05:41:13 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{811:function(e,t,n){"use strict";n.r(t);var a,o,s,c=n(0),i=n(2),r=n(7),d=n(1),l=n(3),u=n.n(l),p=n(13),h=n(736),f=n(733),b=n(102),m=n(250),v=n(6),j=n(740),O=n(8),g=n(30),M=n(62),y=n.n(M),_=n(5),w=n.n(_),C=n(14),R=n.n(C),k=n(18),I=n(229),L=n(282),x=n(710),D=n(754),S=n(294),E=n(50),N=n(104),U=n(295),T=n(20),H=n(12),A=n.n(H),q=Object(v.f)({more:{id:"status.more",defaultMessage:"More"},open:{id:"conversation.open",defaultMessage:"View conversation"},reply:{id:"status.reply",defaultMessage:"Reply"},markAsRead:{id:"conversation.mark_as_read",defaultMessage:"Mark as read"},delete:{id:"conversation.delete",defaultMessage:"Delete conversation"},muteConversation:{id:"status.mute_conversation",defaultMessage:"Mute conversation"},unmuteConversation:{id:"status.unmute_conversation",defaultMessage:"Unmute conversation"}}),P=Object(v.g)((s=o=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return t=e.call.apply(e,[this].concat(a))||this,Object(d.a)(Object(i.a)(t),"handleEmojiMouseEnter",(function(e){var t=e.target;t.src=t.getAttribute("data-original")})),Object(d.a)(Object(i.a)(t),"handleEmojiMouseLeave",(function(e){var t=e.target;t.src=t.getAttribute("data-static")})),Object(d.a)(Object(i.a)(t),"handleClick",(function(){if(t.context.router){var e=t.props,n=e.lastStatus,a=e.unread,o=e.markRead;a&&o(),t.context.router.history.push("/statuses/"+n.get("id"))}})),Object(d.a)(Object(i.a)(t),"handleMarkAsRead",(function(){t.props.markRead()})),Object(d.a)(Object(i.a)(t),"handleReply",(function(){t.props.reply(t.props.lastStatus,t.context.router.history)})),Object(d.a)(Object(i.a)(t),"handleDelete",(function(){t.props.delete()})),Object(d.a)(Object(i.a)(t),"handleHotkeyMoveUp",(function(){t.props.onMoveUp(t.props.conversationId)})),Object(d.a)(Object(i.a)(t),"handleHotkeyMoveDown",(function(){t.props.onMoveDown(t.props.conversationId)})),Object(d.a)(Object(i.a)(t),"handleConversationMute",(function(){t.props.onMute(t.props.lastStatus)})),Object(d.a)(Object(i.a)(t),"handleShowMore",(function(){t.props.onToggleHidden(t.props.lastStatus)})),Object(d.a)(Object(i.a)(t),"setNamesRef",(function(e){t.namesNode=e})),t}Object(r.a)(t,e);var n=t.prototype;return n._updateEmojis=function(){var e=this.namesNode;if(e&&!T.a)for(var t=e.querySelectorAll(".custom-emoji"),n=0;n<t.length;n++){var a=t[n];a.classList.contains("status-emoji")||(a.classList.add("status-emoji"),a.addEventListener("mouseenter",this.handleEmojiMouseEnter,!1),a.addEventListener("mouseleave",this.handleEmojiMouseLeave,!1))}},n.componentDidMount=function(){this._updateEmojis()},n.componentDidUpdate=function(){this._updateEmojis()},n.render=function(){var e=this.props,t=e.accounts,n=e.lastStatus,a=e.unread,o=e.intl;if(null===n)return null;var s=[{text:o.formatMessage(q.open),action:this.handleClick},null];s.push({text:o.formatMessage(n.get("muted")?q.unmuteConversation:q.muteConversation),action:this.handleConversationMute}),a&&(s.push({text:o.formatMessage(q.markAsRead),action:this.handleMarkAsRead}),s.push(null)),s.push({text:o.formatMessage(q.delete),action:this.handleDelete});var i=t.map((function(e){return Object(c.a)(S.a,{to:"/accounts/"+e.get("id"),href:e.get("url"),title:e.get("acct")},e.get("id"),Object(c.a)("bdi",{},void 0,Object(c.a)("strong",{className:"display-name__html",dangerouslySetInnerHTML:{__html:e.get("display_name_html")}})))})).reduce((function(e,t){return[e,", ",t]})),r={reply:this.handleReply,open:this.handleClick,moveUp:this.handleHotkeyMoveUp,moveDown:this.handleHotkeyMoveDown,toggleHidden:this.handleShowMore};return Object(c.a)(U.HotKeys,{handlers:r},void 0,Object(c.a)("div",{className:A()("conversation focusable muted",{"conversation--unread":a}),tabIndex:"0"},void 0,Object(c.a)("div",{className:"conversation__avatar"},void 0,Object(c.a)(D.a,{accounts:t,size:48})),Object(c.a)("div",{className:"conversation__content"},void 0,Object(c.a)("div",{className:"conversation__content__info"},void 0,Object(c.a)("div",{className:"conversation__content__relative-tim
2018-08-12 13:29:30 +00:00
//# sourceMappingURL=direct_timeline.js.map