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

2 lines
32 KiB
JavaScript
Raw Normal View History

2018-06-02 14:11:38 +00:00
webpackJsonp([19,33],{1007:function(e,t,n){"use strict";n.d(t,"a",function(){return I});var i,a,o=n(2),s=n.n(o),r=n(1),l=n.n(r),c=n(3),d=n.n(c),u=n(4),p=n.n(u),h=n(0),f=(n.n(h),n(5)),g=n.n(f),v=n(14),m=n.n(v),b=n(54),y=n(53),_=n(104),k=n(820),M=n(338),C=n(44),O=n(7),j=n(1008),w=n(12),x=n.n(w),N=n(74),I=(a=i=function(e){function t(){var n,i,a;l()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=d()(this,e.call.apply(e,[this].concat(s))),i.handleAccountClick=function(e){0===e.button&&(e.preventDefault(),i.context.router.history.push("/accounts/"+i.props.status.getIn(["account","id"]))),e.stopPropagation()},i.handleOpenVideo=function(e,t){i.props.onOpenVideo(e,t)},i.handleExpandedToggle=function(){i.props.onToggleHidden(i.props.status)},a=n,d()(i,a)}return p()(t,e),t.prototype.render=function(){var e=this.props.status.get("reblog")?this.props.status.get("reblog"):this.props.status,t="",n="",i="",a="retweet";if(e.get("media_attachments").size>0)if(e.get("media_attachments").some(function(e){return"unknown"===e.get("type")}))t=s()(M.a,{media:e.get("media_attachments")});else if("video"===e.getIn(["media_attachments",0,"type"])){var o=e.getIn(["media_attachments",0]);t=s()(N.default,{preview:o.get("preview_url"),src:o.get("url"),width:300,height:150,inline:!0,onOpenVideo:this.handleOpenVideo,sensitive:e.get("sensitive")})}else t=s()(k.default,{standalone:!0,sensitive:e.get("sensitive"),media:e.get("media_attachments"),height:300,onOpenMedia:this.props.onOpenMedia});else 0===e.get("spoiler_text").length&&(t=s()(j.a,{onOpenMedia:this.props.onOpenMedia,statusId:e.get("id")}));return e.get("application")&&(n=s()("span",{},void 0," · ",s()("a",{className:"detailed-status__application",href:e.getIn(["application","website"]),target:"_blank",rel:"noopener"},void 0,e.getIn(["application","name"])))),"direct"===e.get("visibility")?a="envelope":"private"===e.get("visibility")&&(a="lock"),i="private"===e.get("visibility")?s()("i",{className:"fa fa-"+a}):s()(C.b,{to:"/statuses/"+e.get("id")+"/reblogs",className:"detailed-status__link"},void 0,s()("i",{className:"fa fa-"+a}),s()("span",{className:"detailed-status__reblogs"},void 0,s()(O.c,{value:e.get("reblogs_count")}))),s()("div",{className:"detailed-status"},void 0,s()("a",{href:e.getIn(["account","url"]),onClick:this.handleAccountClick,className:"detailed-status__display-name"},void 0,s()("div",{className:"detailed-status__display-avatar"},void 0,s()(b.a,{account:e.get("account"),size:48})),s()(y.a,{account:e.get("account")})),s()(_.a,{status:e,expanded:!e.get("hidden"),onExpandedToggle:this.handleExpandedToggle}),t,s()("div",{className:"detailed-status__meta"},void 0,s()("a",{className:"detailed-status__datetime",href:e.get("url"),target:"_blank",rel:"noopener"},void 0,s()(O.a,{value:new Date(e.get("created_at")),hour12:!1,year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})),n," · ",i," · ",s()(C.b,{to:"/statuses/"+e.get("id")+"/favourites",className:"detailed-status__link"},void 0,s()("i",{className:"fa fa-star"}),s()("span",{className:"detailed-status__favorites"},void 0,s()(O.c,{value:e.get("favourites_count")})))))},t}(x.a),i.contextTypes={router:g.a.object},i.propTypes={status:m.a.map.isRequired,onOpenMedia:g.a.func.isRequired,onOpenVideo:g.a.func.isRequired,onToggleHidden:g.a.func.isRequired},a)},1008:function(e,t,n){"use strict";var i=n(9),a=n(912),o=function(e,t){var n=t.statusId;return{card:e.getIn(["cards",n],null)}};t.a=Object(i.connect)(o)(a.a)},1009: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),c=n.n(l),d=n(3),u=n.n(d),p=n(4),h=n.n(p),f=n(0),g=n.n(f),v=n(5),m=n.n(v),b=n(23),y=n(300),_=n(7),k=n(13),M=Object(_.f)({delete:{id:"status.delete",defaultMessage:"Delete"},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 or
//# sourceMappingURL=status.js.map