spc-pleroma/priv/static/packs/features/status-1f1807fdb4d1fd6daf40.js

2 lines
28 KiB
JavaScript
Raw Normal View History

2017-11-12 13:23:05 +00:00
webpackJsonp([13,26],{150:function(e,t,n){"use strict";n.d(t,"a",function(){return h});var i=n(2),a=n.n(i),o=n(1),s=n.n(o),r=n(3),l=n.n(r),c=n(4),d=n.n(c),u=n(0),p=n.n(u),h=function(e){function t(){var n,i,a;s()(this,t);for(var o=arguments.length,r=Array(o),c=0;c<o;c++)r[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(r))),i.handleClick=function(){i.props.onClick()},a=n,l()(i,a)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.type,n=e.active,i=e.columnHeaderId,o="";return this.props.icon&&(o=a()("i",{className:"fa fa-fw fa-"+this.props.icon+" column-header__icon"})),a()("div",{role:"heading",tabIndex:"0",className:"column-header "+(n?"active":""),onClick:this.handleClick,id:i||null},void 0,o,t)},t}(p.a.PureComponent)},159:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return R});var i,a,o,s,r,l=n(2),c=n.n(l),d=n(1),u=n.n(d),p=n(3),h=n.n(p),f=n(4),g=n.n(f),v=n(0),m=n.n(v),b=n(5),y=n.n(b),_=n(8),M=(n.n(_),n(19)),O=n(6),C=n(33),k=n(10),j=n.n(k),w=n(18),I=Object(O.f)({toggle_visible:{id:"media_gallery.toggle_visible",defaultMessage:"Toggle visibility"}}),x=(a=i=function(e){function t(){var n,i,a;u()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.handleMouseEnter=function(e){i.hoverToPlay()&&e.target.play()},i.handleMouseLeave=function(e){i.hoverToPlay()&&(e.target.pause(),e.target.currentTime=0)},i.handleClick=function(e){var t=i.props,n=t.index,a=t.onClick;i.context.router&&0===e.button&&(e.preventDefault(),a(n)),e.stopPropagation()},a=n,h()(i,a)}return g()(t,e),t.prototype.hoverToPlay=function(){var e=this.props.attachment;return!w.a&&"gifv"===e.get("type")},t.prototype.render=function(){var e=this.props,t=e.attachment,n=e.index,i=e.size,a=e.standalone,o=50,s=100,r="auto",l="auto",d="auto",u="auto";1===i&&(o=100),(4===i||3===i&&n>0)&&(s=50),2===i?0===n?u="2px":l="2px":3===i?(0===n?u="2px":n>0&&(l="2px"),1===n?d="2px":n>1&&(r="2px")):4===i&&(0!==n&&2!==n||(u="2px"),1!==n&&3!==n||(l="2px"),n<2?d="2px":r="2px");var p="";if("image"===t.get("type")){var h=t.get("preview_url"),f=t.getIn(["meta","small","width"]),g=t.get("url"),v=t.getIn(["meta","original","width"]),m="number"==typeof v&&"number"==typeof f,b=m?g+" "+v+"w, "+h+" "+f+"w":null,y=m?"(min-width: 1025px) "+o/100*320+"px, "+o+"vw":null;p=c()("a",{className:"media-gallery__item-thumbnail",href:t.get("remote_url")||g,onClick:this.handleClick,target:"_blank"},void 0,c()("img",{src:h,srcSet:b,sizes:y,alt:t.get("description"),title:t.get("description")}))}else if("gifv"===t.get("type")){var _=!Object(C.a)()&&w.a;p=c()("div",{className:j()("media-gallery__gifv",{autoplay:_})},void 0,c()("video",{className:"media-gallery__item-gifv-thumbnail","aria-label":t.get("description"),role:"application",src:t.get("url"),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,autoPlay:_,loop:!0,muted:!0}),c()("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}return c()("div",{className:j()("media-gallery__item",{standalone:a}),style:{left:l,top:r,right:u,bottom:d,width:o+"%",height:s+"%"}},t.get("id"),p)},t}(m.a.PureComponent),i.contextTypes={router:y.a.object},i.defaultProps={standalone:!1,index:0,size:1},a),R=Object(O.g)((r=s=function(e){function t(){var n,i,a;u()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.state={visible:!i.props.sensitive},i.handleOpen=function(){i.setState({visible:!i.state.visible})},i.handleClick=function(e){i.props.onOpenMedia(i.props.media,e)},i.handleRef=function(e){e&&i.isStandaloneEligible()&&i.setState({width:e.offsetWidth})},a=n,h()(i,a)}return g()(t,e),t.prototype.componentWillReceiveProps=function(e){Object(_.is)(e.media,this.props.media)||this.setState({visible:!e.sensitive})},t.prototype.isStandaloneEligible=function(){var e=this.props,t=e.media;return e.standalone&&1===t.size&&t.getIn([0,"meta","small","aspect"])},t.prototype.render=func
//# sourceMappingURL=status-1f1807fdb4d1fd6daf40.js.map