X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=priv%2Fstatic%2Fpacks%2Ffeatures%2Faccount_gallery.js;h=19dbf1fec1ae618a1185fb900218288cdf2159b6;hb=4a45b96a91485a39f26bcc86b6cbd21d1547511e;hp=8edf216a9dcf7d277fb7f2e98b3dd8283c773911;hpb=be2777715650d0ac80509f0bd22b4cea8641f9b3;p=akkoma
diff --git a/priv/static/packs/features/account_gallery.js b/priv/static/packs/features/account_gallery.js
index 8edf216a9..19dbf1fec 100644
--- a/priv/static/packs/features/account_gallery.js
+++ b/priv/static/packs/features/account_gallery.js
@@ -1,2 +1,2 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{768:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a(2),i=a(7),c=a(1),s=a(3),r=a.n(s),l=a(12),d=a(18),p=a.n(d),u=a(5),h=a.n(u),b=a(26),m=a(35),O=a(294),g=a(663),f=a(666),j=a(19),v=a(204),y=a(27),_=a(20),I=a(10),M=a.n(I),L=a(208),w=a(114),x=function(e){function t(){for(var t,a=arguments.length,n=new Array(a),i=0;i0?t.props.attachments.last().getIn(["status","id"]):void 0)}),Object(c.a)(Object(o.a)(t),"handleScroll",function(e){var a=e.target,n=a.scrollTop;150>a.scrollHeight-n-a.clientHeight&&!t.props.isLoading&&t.handleScrollToBottom()}),Object(c.a)(Object(o.a)(t),"handleLoadMore",function(e){t.props.dispatch(Object(m.p)(t.props.params.accountId,{maxId:e}))}),Object(c.a)(Object(o.a)(t),"handleLoadOlder",function(e){e.preventDefault(),t.handleScrollToBottom()}),Object(c.a)(Object(o.a)(t),"handleOpenMedia",function(e){if(["video","audio"].includes(e.get("type")))t.props.dispatch(Object(D.d)("VIDEO",{media:e,status:e.get("status")}));else{var a=e.getIn(["status","media_attachments"]),n=a.findIndex(function(t){return t.get("id")===e.get("id")});t.props.dispatch(Object(D.d)("MEDIA",{media:a,index:n,status:e.get("status")}))}}),Object(c.a)(Object(o.a)(t),"handleRef",function(e){e&&t.setState({width:e.offsetWidth})}),t}Object(i.a)(t,e);var a=t.prototype;return a.componentDidMount=function(){this.props.dispatch(Object(b.A)(this.props.params.accountId)),this.props.dispatch(Object(m.p)(this.props.params.accountId))},a.componentWillReceiveProps=function(e){e.params.accountId!==this.props.params.accountId&&e.params.accountId&&(this.props.dispatch(Object(b.A)(e.params.accountId)),this.props.dispatch(Object(m.p)(this.props.params.accountId)))},a.render=function(){var e=this,t=this.props,a=t.attachments,o=t.shouldUpdateScroll,i=t.isLoading,c=t.hasMore,s=t.isAccount,l=t.multiColumn,d=this.state.width;if(!s)return Object(n.a)(g.a,{},void 0,Object(n.a)(A.a,{}));if(!a&&i)return Object(n.a)(g.a,{},void 0,Object(n.a)(O.a,{}));var p=null;return!c||i&&0===a.size||(p=Object(n.a)(k.a,{visible:!i,onClick:this.handleLoadOlder})),Object(n.a)(g.a,{},void 0,Object(n.a)(f.a,{multiColumn:l}),Object(n.a)(T.a,{scrollKey:"account_gallery",shouldUpdateScroll:o},void 0,Object(n.a)("div",{className:"scrollable scrollable--flex",onScroll:this.handleScroll},void 0,Object(n.a)(N.a,{accountId:this.props.params.accountId}),r.a.createElement("div",{role:"feed",className:"account-gallery__container",ref:this.handleRef},a.map(function(t,o){return null===t?Object(n.a)(q,{maxId:o>0?a.getIn(o-1,"id"):null,onLoadMore:e.handleLoadMore},"more:"+a.getIn(o+1,"id")):Object(n.a)(x,{attachment:t,displayWidth:d,onOpenMedia:e.handleOpenMedia},t.get("id"))}),p),i&&0===a.size&&Object(n.a)("div",{className:"scrollable__append"},void 0,Object(n.a)(O.a,{})))))},t}(j.a),Object(c.a)(S,"propTypes",{params:h.a.object.isRequired,dispatch:h.a.func.isRequired,attachments:p.a.list.isRequired,isLoading:h.a.bool,hasMore:h.a.bool,isAccount:h.a.bool,multiColumn:h.a.bool}),R=C))||R}}]);
+(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{837:function(e,t,a){"use strict";a.r(t);var o=a(0),n=a(2),i=a(7),c=a(1),s=a(3),r=a.n(s),l=a(13),d=a(14),p=a.n(d),u=a(5),h=a.n(u),b=a(25),m=a(33),O=a(300),g=a(731),f=a(738),j=a(18),v=a(206),y=a(211),_=a(12),I=a.n(_),M=a(26),L=a(20),w=a(116),x=function(e){function t(){for(var t,a=arguments.length,o=new Array(a),i=0;i0?t.props.attachments.last().getIn(["status","id"]):void 0)})),Object(c.a)(Object(n.a)(t),"handleScroll",(function(e){var a=e.target,o=a.scrollTop;150>a.scrollHeight-o-a.clientHeight&&!t.props.isLoading&&t.handleScrollToBottom()})),Object(c.a)(Object(n.a)(t),"handleLoadMore",(function(e){t.props.dispatch(Object(m.p)(t.props.params.accountId,{maxId:e}))})),Object(c.a)(Object(n.a)(t),"handleLoadOlder",(function(e){e.preventDefault(),t.handleScrollToBottom()})),Object(c.a)(Object(n.a)(t),"handleOpenMedia",(function(e){if("video"===e.get("type"))t.props.dispatch(Object(k.d)("VIDEO",{media:e,status:e.get("status")}));else if("audio"===e.get("type"))t.props.dispatch(Object(k.d)("AUDIO",{media:e,status:e.get("status")}));else{var a=e.getIn(["status","media_attachments"]),o=a.findIndex((function(t){return t.get("id")===e.get("id")}));t.props.dispatch(Object(k.d)("MEDIA",{media:a,index:o,status:e.get("status")}))}})),Object(c.a)(Object(n.a)(t),"handleRef",(function(e){e&&t.setState({width:e.offsetWidth})})),t}Object(i.a)(t,e);var a=t.prototype;return a.componentDidMount=function(){this.props.dispatch(Object(b.A)(this.props.params.accountId)),this.props.dispatch(Object(m.p)(this.props.params.accountId))},a.componentWillReceiveProps=function(e){e.params.accountId!==this.props.params.accountId&&e.params.accountId&&(this.props.dispatch(Object(b.A)(e.params.accountId)),this.props.dispatch(Object(m.p)(this.props.params.accountId)))},a.render=function(){var e=this,t=this.props,a=t.attachments,n=t.shouldUpdateScroll,i=t.isLoading,c=t.hasMore,s=t.isAccount,l=t.multiColumn,d=this.state.width;if(!s)return Object(o.a)(g.a,{},void 0,Object(o.a)(D.a,{}));if(!a&&i)return Object(o.a)(g.a,{},void 0,Object(o.a)(O.a,{}));var p=null;return!c||i&&0===a.size||(p=Object(o.a)(A.a,{visible:!i,onClick:this.handleLoadOlder})),Object(o.a)(g.a,{},void 0,Object(o.a)(f.a,{multiColumn:l}),Object(o.a)(T.a,{scrollKey:"account_gallery",shouldUpdateScroll:n},void 0,Object(o.a)("div",{className:"scrollable scrollable--flex",onScroll:this.handleScroll},void 0,Object(o.a)(N.a,{accountId:this.props.params.accountId}),r.a.createElement("div",{role:"feed",className:"account-gallery__container",ref:this.handleRef},a.map((function(t,n){return null===t?Object(o.a)(q,{maxId:n>0?a.getIn(n-1,"id"):null,onLoadMore:e.handleLoadMore},"more:"+a.getIn(n+1,"id")):Object(o.a)(x,{attachment:t,displayWidth:d,onOpenMedia:e.handleOpenMedia},t.get("id"))})),p),i&&0===a.size&&Object(o.a)("div",{className:"scrollable__append"},void 0,Object(o.a)(O.a,{})))))},t}(j.a),Object(c.a)(S,"propTypes",{params:h.a.object.isRequired,dispatch:h.a.func.isRequired,attachments:p.a.list.isRequired,isLoading:h.a.bool,hasMore:h.a.bool,isAccount:h.a.bool,multiColumn:h.a.bool}),R=C))||R}}]);
//# sourceMappingURL=account_gallery.js.map
\ No newline at end of file