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

2 lines
27 KiB
JavaScript
Raw Normal View History

2020-02-29 06:41:13 +01:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[85],{757:function(e,t,a){"use strict";a.d(t,"a",(function(){return H}));var s=a(0),i=a(8),n=a(2),o=a(7),c=a(1),l=a(3),d=a.n(l),r=a(5),u=a.n(r),p=a(14),h=a.n(p),b=a(91),g=a(93),f=a(150),m=a(468),O=a(262),j=a(316),v=a(6),k=a(469),M=a(18),y=a(83),_=a(223),C=a(535),x=a(746),I=a(12),w=a.n(I),R=a(537),D=a(23),H=function(e){function t(){for(var t,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];return t=e.call.apply(e,[this].concat(s))||this,Object(c.a)(Object(n.a)(t),"state",{height:null}),Object(c.a)(Object(n.a)(t),"handleAccountClick",(function(e){if(0===e.button&&!(e.ctrlKey||e.altKey||e.metaKey)&&t.context.router){e.preventDefault();var a=Object(i.default)({},t.context.router.history.location.state);a.mastodonBackSteps=(a.mastodonBackSteps||0)+1,t.context.router.history.push("/accounts/"+t.props.status.getIn(["account","id"]),a)}e.stopPropagation()})),Object(c.a)(Object(n.a)(t),"parseClick",(function(e,a){if(0===e.button&&!(e.ctrlKey||e.altKey||e.metaKey)&&t.context.router){e.preventDefault();var s=Object(i.default)({},t.context.router.history.location.state);s.mastodonBackSteps=(s.mastodonBackSteps||0)+1,t.context.router.history.push(a,s)}e.stopPropagation()})),Object(c.a)(Object(n.a)(t),"handleOpenVideo",(function(e,a){t.props.onOpenVideo(e,a)})),Object(c.a)(Object(n.a)(t),"setRef",(function(e){t.node=e,t._measureHeight()})),Object(c.a)(Object(n.a)(t),"handleChildUpdate",(function(){t._measureHeight()})),Object(c.a)(Object(n.a)(t),"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")})),t}Object(o.a)(t,e);var a=t.prototype;return a._measureHeight=function(e){var t=this;this.props.measureHeight&&this.node&&(Object(x.a)((function(){return t.node&&t.setState({height:Math.ceil(t.node.scrollHeight)+1})})),this.props.onHeightChange&&e&&this.props.onHeightChange())},a.componentDidUpdate=function(e,t){this._measureHeight(t.height!==this.state.height)},a.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,i=t.onToggleHidden,n=t.settings,o={boxSizing:"border-box"},c=this.props.compact;if(!e)return null;var l=null,r=null,u="",p="",h="retweet",M="";if(this.props.measureHeight&&(o.height=this.state.height+"px"),e.get("poll"))l=Object(s.a)(R.a,{pollId:e.get("poll")}),r="tasks";else if(e.get("media_attachments").size>0)if(e.get("media_attachments").some((function(e){return"unknown"===e.get("type")})))l=Object(s.a)(O.a,{media:e.get("media_attachments")});else if("audio"===e.getIn(["media_attachments",0,"type"])){var x=e.getIn(["media_attachments",0]);l=Object(s.a)(_.default,{src:x.get("url"),alt:x.get("description"),duration:x.getIn(["meta","original","duration"],0),height:110,preload:!0}),r="music"}else if("video"===e.getIn(["media_attachments",0,"type"])){var I=e.getIn(["media_attachments",0]);l=Object(s.a)(y.default,{preview:I.get("preview_url"),blurhash:I.get("blurhash"),src:I.get("url"),alt:I.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,visible:this.props.showMedia,onToggleVisibility:this.props.onToggleMediaVisibility}),r="video-camera"}else l=Object(s.a)(m.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,visible:this.props.showMedia,onToggleVisibility:this.props.onToggleMediaVisibility}),r="picture-o";else e.get("card")&&(l=Object(s.a)(k.a,{onOpenMedia:this.props.onOpenMedia,card:e.get("card")}),r="link");return e.get("application")&&(u=Object(s.a)("span",{},void 0," · ",Object(s.a)("a",{className:"detailed-status__application",href:e.getIn(["application","website"]),target:"_blan
2018-09-16 23:17:34 +02:00
//# sourceMappingURL=status.js.map