2019-06-26 21:06:28 +02:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{646:function(e,t,a){"use strict";a.d(t,"a",function(){return R});var b=a(0),n=a(15),i=a(2),s=a(6),c=a(1),o=a(3),f=a.n(o),r=a(5),l=a.n(r),d=a(26),u=a.n(d),g=a(97),m=a(98),O=a(135),j=a(431),v=a(384),k=a(358),y=a(7),M=a(432),p=a(25),C=a(131),_=a(498),h=a(639),x=a(12),I=a.n(x),w=a(500),R=function(o){function e(){for(var s,e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return s=o.call.apply(o,[this].concat(t))||this,Object(c.a)(Object(i.a)(s),"state",{height:null}),Object(c.a)(Object(i.a)(s),"handleAccountClick",function(e){if(0===e.button&&!(e.ctrlKey||e.altKey||e.metaKey)&&s.context.router){e.preventDefault();var t=Object(n.a)({},s.context.router.history.location.state);t.mastodonBackSteps=(t.mastodonBackSteps||0)+1,s.context.router.history.push("/accounts/"+s.props.status.getIn(["account","id"]),t)}e.stopPropagation()}),Object(c.a)(Object(i.a)(s),"parseClick",function(e,t){if(0===e.button&&!(e.ctrlKey||e.altKey||e.metaKey)&&s.context.router){e.preventDefault();var a=Object(n.a)({},s.context.router.history.location.state);a.mastodonBackSteps=(a.mastodonBackSteps||0)+1,s.context.router.history.push(t,a)}e.stopPropagation()}),Object(c.a)(Object(i.a)(s),"handleOpenVideo",function(e,t){s.props.onOpenVideo(e,t)}),Object(c.a)(Object(i.a)(s),"setRef",function(e){s.node=e,s._measureHeight()}),Object(c.a)(Object(i.a)(s),"handleChildUpdate",function(){s._measureHeight()}),Object(c.a)(Object(i.a)(s),"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")}),s}Object(s.a)(e,o);var t=e.prototype;return t._measureHeight=function(e){var t=this;this.props.measureHeight&&this.node&&(Object(h.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,o=t.settings,n={boxSizing:"border-box"},i=this.props.compact;if(!e)return null;var c="",r=null,l="",d="",u="retweet",p="";if(this.props.measureHeight&&(n.height=this.state.height+"px"),e.get("poll"))c=Object(b.a)(w.a,{pollId:e.get("poll")}),r="tasks";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:o.getIn(["media","letterbox"]),fullwidth:o.getIn(["media","fullwidth"]),preventPlayback:!a,onOpenVideo:this.handleOpenVideo,autoplay:!0,revealed:!(!o.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:o.getIn(["media","letterbox"]),fullwidth:o.getIn(["media","fullwidth"]),hidden:!a,onOpenMedia:this.props.onOpenMedia,revealed:!(!o.getIn(["media","reveal_behind_cw"])||!e.get("spoiler_text"))||void 0}),r="picture-o";else c=Object(b.a)(M.a,{onOpenMedia:this.props.onOpenMedia,card:e.get("card",null)}),r="link";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"},vo
|