pleroma/priv/static/packs/flavours/glitch/async/status.js

2 lines
24 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{645:function(e,t,a){"use strict";a.d(t,"a",function(){return w});var b=a(0),o=a(3),s=a(7),i=a(1),n=a(2),f=a.n(n),c=a(5),r=a.n(c),l=a(27),d=a.n(l),g=a(102),m=a(103),O=a(137),j=a(430),v=a(383),k=a(358),M=a(6),y=a(431),u=a(25),C=a(132),_=a(497),p=a(637),h=a(12),x=a.n(h),I=a(499),w=function(n){function e(){for(var a,e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return a=n.call.apply(n,[this].concat(t))||this,Object(i.a)(Object(o.a)(a),"state",{height:null}),Object(i.a)(Object(o.a)(a),"handleAccountClick",function(e){0===e.button&&!(e.ctrlKey||e.altKey||e.metaKey)&&a.context.router&&(e.preventDefault(),a.context.router.history.push("/accounts/"+a.props.status.getIn(["account","id"]))),e.stopPropagation()}),Object(i.a)(Object(o.a)(a),"parseClick",function(e,t){0===e.button&&!(e.ctrlKey||e.altKey||e.metaKey)&&a.context.router&&(e.preventDefault(),a.context.router.history.push(t)),e.stopPropagation()}),Object(i.a)(Object(o.a)(a),"handleOpenVideo",function(e,t){a.props.onOpenVideo(e,t)}),Object(i.a)(Object(o.a)(a),"setRef",function(e){a.node=e,a._measureHeight()}),Object(i.a)(Object(o.a)(a),"handleChildUpdate",function(){a._measureHeight()}),Object(i.a)(Object(o.a)(a),"handleModalLink",function(e){var t;e.preventDefault(),t="A"!==e.target.nodeName?e.target.parentNode.href:e.target.href,window.open(t,"mastodon-intent","width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes")}),a}Object(s.a)(e,n);var t=e.prototype;return t._measureHeight=function(e){var t=this;this.props.measureHeight&&this.node&&(Object(p.a)(function(){return t.node&&t.setState({height:Math.ceil(t.node.scrollHeight)+1})}),this.props.onHeightChange&&e&&this.props.onHeightChange())},t.componentDidUpdate=function(e,t){this._measureHeight(t.height!==this.state.height)},t.render=function(){var e=this.props.status&&this.props.status.get("reblog")?this.props.status.get("reblog"):this.props.status,t=this.props,a=t.expanded,s=t.onToggleHidden,n=t.settings,o={boxSizing:"border-box"},i=this.props.compact;if(!e)return null;var c="",r=null,l="",d="",u="retweet",p="";if(this.props.measureHeight&&(o.height=this.state.height+"px"),e.get("poll"))c=Object(b.a)(I.a,{pollId:e.get("poll")});else if(0<e.get("media_attachments").size)if(e.get("media_attachments").some(function(e){return"unknown"===e.get("type")}))c=Object(b.a)(v.a,{media:e.get("media_attachments")});else if("video"===e.getIn(["media_attachments",0,"type"])){var h=e.getIn(["media_attachments",0]);c=Object(b.a)(C.default,{preview:h.get("preview_url"),src:h.get("url"),alt:h.get("description"),inline:!0,sensitive:e.get("sensitive"),letterbox:n.getIn(["media","letterbox"]),fullwidth:n.getIn(["media","fullwidth"]),preventPlayback:!a,onOpenVideo:this.handleOpenVideo,autoplay:!0,revealed:!(!n.getIn(["media","reveal_behind_cw"])||!e.get("spoiler_text"))||void 0}),r="video-camera"}else c=Object(b.a)(j.default,{standalone:!0,sensitive:e.get("sensitive"),media:e.get("media_attachments"),letterbox:n.getIn(["media","letterbox"]),fullwidth:n.getIn(["media","fullwidth"]),hidden:!a,onOpenMedia:this.props.onOpenMedia,revealed:!(!n.getIn(["media","reveal_behind_cw"])||!e.get("spoiler_text"))||void 0}),r="picture-o";else c=Object(b.a)(y.a,{onOpenMedia:this.props.onOpenMedia,card:e.get("card",null)});return e.get("application")&&(l=Object(b.a)("span",{},void 0," · ",Object(b.a)("a",{className:"detailed-status__application",href:e.getIn(["application","website"]),target:"_blank",rel:"noopener"},void 0,e.getIn(["application","name"])))),"direct"===e.get("visibility")?u="envelope":"private"===e.get("visibility")&&(u="lock"),d="private"===e.get("visibility")?Object(b.a)("i",{className:"fa fa-"+u}):this.context.router?Object(b.a)(k.a,{to:"/statuses/"+e.get("id")+"/reblogs",className:"detailed-status__link"},void 0,Object(b.a)("i",{className:"fa fa-"+u}),Object(b.a)("span",{className:"detailed-status__reblogs"},void 0,Object(b.a)(M.c,{value:e.get("reblogs_count")}))):Object(b.a)("a",{href:"/interact/"+e.get("id")+"?type=reblog",className:"detailed-status_
2018-09-16 14:17:34 -07:00
//# sourceMappingURL=status.js.map