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

2 lines
33 KiB
JavaScript
Raw Normal View History

2018-08-12 13:29:30 +00:00
webpackJsonp([19,33],{1e3:function(e,t,n){"use strict";n.d(t,"a",function(){return C});var i,a,o,s=n(2),r=n.n(s),l=n(1),d=n.n(l),c=n(3),u=n.n(c),p=n(4),h=n.n(p),f=n(0),g=n.n(f),m=n(5),v=n.n(m),b=n(23),y=n(291),_=n(7),M=n(13),k=Object(_.f)({delete:{id:"status.delete",defaultMessage:"Delete"},redraft:{id:"status.redraft",defaultMessage:"Delete & re-draft"},direct:{id:"status.direct",defaultMessage:"Direct message @{name}"},mention:{id:"status.mention",defaultMessage:"Mention @{name}"},reply:{id:"status.reply",defaultMessage:"Reply"},reblog:{id:"status.reblog",defaultMessage:"Boost"},reblog_private:{id:"status.reblog_private",defaultMessage:"Boost to original audience"},cancel_reblog_private:{id:"status.cancel_reblog_private",defaultMessage:"Unboost"},cannot_reblog:{id:"status.cannot_reblog",defaultMessage:"This post cannot be boosted"},favourite:{id:"status.favourite",defaultMessage:"Favourite"},mute:{id:"status.mute",defaultMessage:"Mute @{name}"},muteConversation:{id:"status.mute_conversation",defaultMessage:"Mute conversation"},unmuteConversation:{id:"status.unmute_conversation",defaultMessage:"Unmute conversation"},block:{id:"status.block",defaultMessage:"Block @{name}"},report:{id:"status.report",defaultMessage:"Report @{name}"},share:{id:"status.share",defaultMessage:"Share"},pin:{id:"status.pin",defaultMessage:"Pin on profile"},unpin:{id:"status.unpin",defaultMessage:"Unpin from profile"},embed:{id:"status.embed",defaultMessage:"Embed"}}),C=Object(_.g)((o=a=function(e){function t(){var n,i,a;d()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.handleReplyClick=function(){i.props.onReply(i.props.status)},i.handleReblogClick=function(e){i.props.onReblog(i.props.status,e)},i.handleFavouriteClick=function(){i.props.onFavourite(i.props.status)},i.handleDeleteClick=function(){i.props.onDelete(i.props.status)},i.handleRedraftClick=function(){i.props.onDelete(i.props.status,!0)},i.handleDirectClick=function(){i.props.onDirect(i.props.status.get("account"),i.context.router.history)},i.handleMentionClick=function(){i.props.onMention(i.props.status.get("account"),i.context.router.history)},i.handleMuteClick=function(){i.props.onMute(i.props.status.get("account"))},i.handleConversationMuteClick=function(){i.props.onMuteConversation(i.props.status)},i.handleBlockClick=function(){i.props.onBlock(i.props.status.get("account"))},i.handleReport=function(){i.props.onReport(i.props.status)},i.handlePinClick=function(){i.props.onPin(i.props.status)},i.handleShare=function(){navigator.share({text:i.props.status.get("search_index"),url:i.props.status.get("url")})},i.handleEmbed=function(){i.props.onEmbed(i.props.status)},a=n,u()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.status,n=e.intl,i=["public","unlisted"].includes(t.get("visibility")),a=t.get("muted"),o=[];i&&(o.push({text:n.formatMessage(k.embed),action:this.handleEmbed}),o.push(null)),M.i===t.getIn(["account","id"])?(i?o.push({text:n.formatMessage(t.get("pinned")?k.unpin:k.pin),action:this.handlePinClick}):"private"===t.get("visibility")&&o.push({text:n.formatMessage(t.get("reblogged")?k.cancel_reblog_private:k.reblog_private),action:this.handleReblogClick}),o.push(null),o.push({text:n.formatMessage(a?k.unmuteConversation:k.muteConversation),action:this.handleConversationMuteClick}),o.push(null),o.push({text:n.formatMessage(k.delete),action:this.handleDeleteClick}),o.push({text:n.formatMessage(k.redraft),action:this.handleRedraftClick})):(o.push({text:n.formatMessage(k.mention,{name:t.getIn(["account","username"])}),action:this.handleMentionClick}),o.push({text:n.formatMessage(k.direct,{name:t.getIn(["account","username"])}),action:this.handleDirectClick}),o.push(null),o.push({text:n.formatMessage(k.mute,{name:t.getIn(["account","username"])}),action:this.handleMuteClick}),o.push({text:n.formatMessage(k.block,{name:t.getIn(["account","username"])}),action:this.handleBlockClick}),o.push({text:n.formatMessage(k.report,{name:t.getIn(["account","username"])}),action:this.ha
//# sourceMappingURL=status.js.map