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

2 lines
9.2 KiB
JavaScript
Raw Normal View History

2020-01-22 15:00:23 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{742:function(e,t,n){"use strict";n.r(t);var a,o,s,c=n(0),i=n(2),r=n(7),l=n(1),d=n(3),u=n.n(d),p=n(12),h=n(669),b=n(665),f=n(111),v=n(245),m=n(6),j=n(672),O=n(22),g=n(31),M=n(63),y=n.n(M),_=n(5),w=n.n(_),C=n(18),k=n.n(C),I=n(19),R=n(223),x=n(276),S=n(637),D=n(685),L=n(286),T=n(51),U=n(100),H=n(287),N=Object(m.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"}}),A=Object(m.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(l.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(l.a)(Object(i.a)(t),"handleMarkAsRead",function(){t.props.markRead()}),Object(l.a)(Object(i.a)(t),"handleReply",function(){t.props.reply(t.props.lastStatus,t.context.router.history)}),Object(l.a)(Object(i.a)(t),"handleDelete",function(){t.props.delete()}),Object(l.a)(Object(i.a)(t),"handleHotkeyMoveUp",function(){t.props.onMoveUp(t.props.conversationId)}),Object(l.a)(Object(i.a)(t),"handleHotkeyMoveDown",function(){t.props.onMoveDown(t.props.conversationId)}),Object(l.a)(Object(i.a)(t),"handleConversationMute",function(){t.props.onMute(t.props.lastStatus)}),Object(l.a)(Object(i.a)(t),"handleShowMore",function(){t.props.onToggleHidden(t.props.lastStatus)}),t}return Object(r.a)(t,e),t.prototype.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(N.open),action:this.handleClick},null];s.push({text:o.formatMessage(n.get("muted")?N.unmuteConversation:N.muteConversation),action:this.handleConversationMute}),a&&(s.push({text:o.formatMessage(N.markAsRead),action:this.handleMarkAsRead}),s.push(null)),s.push({text:o.formatMessage(N.delete),action:this.handleDelete});var i=t.map(function(e){return Object(c.a)(L.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)(H.HotKeys,{handlers:r},void 0,Object(c.a)("div",{className:"conversation focusable muted",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-time"},void 0,Object(c.a)(U.default,{timestamp:n.get("created_at")})),Object(c.a)("div",{className:"conversation__content__names"},void 0,Object(c.a)(m.b,{id:"conversation.with",defaultMessage:"With {names}",values:{names:Object(c.a)("span",{},void 0,i)}}))),Object(c.a)(R.a,{status:n,onClick:this.handleClick,expanded:!n.get("hidden"),onExpandedToggle:this.handleShowMore,collapsable:!0}),n.get("media_attachments").size>0&&Object(c.a)(x.a,{compact:!0,media:n.get("media_attachments")}),Object(c.a)("div",{className:"status__action-bar"},void 0,Object(c.a)(T.a,{className:"status__action-bar-button",title:o.formatMessage(N.reply),icon:"reply",onClick:this.handleReply}),Object(c.a)("div",{className:"status__action-bar-dropdown"},void 0,Object(c.a)(S.a,{status:n,items:s,icon:"ellipsis-h",size:18,direction:"right",title:o.formatMessage(
2018-08-12 13:29:30 +00:00
//# sourceMappingURL=direct_timeline.js.map