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

2 lines
27 KiB
JavaScript
Raw Normal View History

2020-05-19 22:55:14 -07:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[85],{783:function(e,t,a){"use strict";a.d(t,"a",(function(){return S}));var s=a(0),n=a(10),i=a(2),o=(a(9),a(6),a(8)),c=a(1),l=a(3),r=a.n(l),d=a(5),u=a.n(d),p=a(16),h=a.n(p),b=a(96),g=a(98),f=a(155),m=a(474),O=a(265),j=a(322),v=a(7),k=a(475),M=a(21),y=a(87),_=a(227),C=a(541),x=a(772),I=a(14),w=a.n(I),R=a(543),D=a(25),H=a(589);var S=function(e){Object(o.a)(a,e);var t;t=a;function a(){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(i.a)(t),"state",{height:null}),Object(c.a)(Object(i.a)(t),"handleAccountClick",(function(e){if(0===e.button&&!(e.ctrlKey||e.altKey||e.metaKey)&&t.context.router){e.preventDefault();var a=Object(n.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(i.a)(t),"parseClick",(function(e,a){if(0===e.button&&!(e.ctrlKey||e.altKey||e.metaKey)&&t.context.router){e.preventDefault();var s=Object(n.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(i.a)(t),"handleOpenVideo",(function(e,a){t.props.onOpenVideo(e,a)})),Object(c.a)(Object(i.a)(t),"setRef",(function(e){t.node=e,t._measureHeight()})),Object(c.a)(Object(i.a)(t),"handleChildUpdate",(function(){t._measureHeight()})),Object(c.a)(Object(i.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}var l=a.prototype;return l._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())},l.componentDidUpdate=function(e,t){this._measureHeight(t.height!==this.state.height)},l.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,n=t.onToggleHidden,i=t.settings,o={boxSizing:"border-box"},c=this.props.compact;if(!e)return null;var l=null,d=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")}),d="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}),d="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:i.getIn(["media","letterbox"]),fullwidth:i.getIn(["media","fullwidth"]),preventPlayback:!a,onOpenVideo:this.handleOpenVideo,autoplay:!0,visible:this.props.showMedia,onToggleVisibility:this.props.onToggleMediaVisibility}),d="video-camera"}else l=Object(s.a)(m.default,{standalone:!0,sensitive:e.get("sensitive"),media:e.get("media_attachments"),letterbox:i.getIn(["media","letterbox"]),fullwidth:i.getIn(["media","fullwidth"]),hidden:!a,onOpenMedia:this.props.onOpenMedia,visible:this.props.showMedia,onToggleVisibility:this.props.onToggleMediaVisibility}),d="picture-o";else e.get("card")&&(l=Object(s.a)(k.a,{onOpenMedia:this.props.onOpenMedia,card:e.get("card")}),d="link");return e.get("application")&&(u=Object(s.a)("span",{},void 0," · ",Object(s.a)("a",{className:"detailed-status__application",href:e.getIn(["ap
2018-09-16 14:17:34 -07:00
//# sourceMappingURL=status.js.map