X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=priv%2Fstatic%2Fpacks%2Ffeatures%2Faccount_gallery.js;h=6afdba220a5b55cceaee04cb9e6d958e47467dd6;hb=423ea497bb2a7225f4f0d0e1ebff93466b3ec124;hp=8edf216a9dcf7d277fb7f2e98b3dd8283c773911;hpb=d770cffce0aec0eeb427c8851437f04329700da9;p=akkoma
diff --git a/priv/static/packs/features/account_gallery.js b/priv/static/packs/features/account_gallery.js
index 8edf216a9..6afdba220 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],{863:function(t,e,a){"use strict";a.r(e),a.d(e,"default",(function(){return z}));var n=a(0),o=a(2),c=a(9),i=a(6),s=a(8),r=a(1),l=a(3),d=a.n(l),p=a(15),u=a(16),h=a.n(u),b=a(5),m=a.n(b),f=a(26),O=a(36),g=a(306),j=a(757),v=a(764),y=a(21),_=a(210),I=a(215),M=a(14),L=a.n(M),w=a(27),R=a(22),x=a(120);var S=function(t){Object(s.a)(a,t);var e;e=a;function a(){for(var e,a=arguments.length,n=new Array(a),c=0;c0?e.props.attachments.last().getIn(["status","id"]):void 0)})),Object(r.a)(Object(o.a)(e),"handleScroll",(function(t){var a=t.target,n=a.scrollTop;150>a.scrollHeight-n-a.clientHeight&&!e.props.isLoading&&e.handleScrollToBottom()})),Object(r.a)(Object(o.a)(e),"handleLoadMore",(function(t){e.props.dispatch(Object(O.p)(e.props.params.accountId,{maxId:t}))})),Object(r.a)(Object(o.a)(e),"handleLoadOlder",(function(t){t.preventDefault(),e.handleScrollToBottom()})),Object(r.a)(Object(o.a)(e),"handleOpenMedia",(function(t){if("video"===t.get("type"))e.props.dispatch(Object(E.d)("VIDEO",{media:t,status:t.get("status")}));else if("audio"===t.get("type"))e.props.dispatch(Object(E.d)("AUDIO",{media:t,status:t.get("status")}));else{var a=t.getIn(["status","media_attachments"]),n=a.findIndex((function(e){return e.get("id")===t.get("id")}));e.props.dispatch(Object(E.d)("MEDIA",{media:a,index:n,status:t.get("status")}))}})),Object(r.a)(Object(o.a)(e),"handleRef",(function(t){t&&e.setState({width:t.offsetWidth})})),e}var a=e.prototype;return a.componentDidMount=function(){this.props.dispatch(Object(f.A)(this.props.params.accountId)),this.props.dispatch(Object(O.p)(this.props.params.accountId))},a.componentWillReceiveProps=function(t){t.params.accountId!==this.props.params.accountId&&t.params.accountId&&(this.props.dispatch(Object(f.A)(t.params.accountId)),this.props.dispatch(Object(O.p)(this.props.params.accountId)))},a.render=function(){var t=this,e=this.props,a=e.attachments,o=e.shouldUpdateScroll,c=e.isLoading,i=e.hasMore,s=e.isAccount,r=e.multiColumn,l=this.state.width;if(!s)return Object(n.a)(j.a,{},void 0,Object(n.a)(q.a,{}));if(!a&&c)return Object(n.a)(j.a,{},void 0,Object(n.a)(g.a,{}));var p=null;return!i||c&&0===a.size||(p=Object(n.a)(k.a,{visible:!c,onClick:this.handleLoadOlder})),Object(n.a)(j.a,{},void 0,Object(n.a)(v.a,{multiColumn:r}),Object(n.a)(A.a,{scrollKey:"account_gallery",shouldUpdateScroll:o},void 0,Object(n.a)("div",{className:"scrollable scrollable--flex",onScroll:this.handleScroll},void 0,Object(n.a)(T.a,{accountId:this.props.params.accountId}),d.a.createElement("div",{role:"feed",className:"account-gallery__container",ref:this.handleRef},a.map((function(e,o){return null===e?Object(n.a)(W,{maxId:o>0?a.getIn(o-1,"id"):null,onLoadMore:t.handleLoadMore},"more:"+a.getIn(o+1,"id")):Object(n.a)(S,{attachment:e,displayWidth:l,onOpenMedia:t.handleOpenMedia},e.get("id"))})),p),c&&0===a.size&&Object(n.a)("div",{className:"scrollable__append"},void 0,Object(n.a)(g.a,{})))))},e}(y.a),Object(r.a)(C,"propTypes",{params:m.a.object.isRequired,dispatch:m.a.func.isRequired,attachments:h.a.list.isRequired,isLoading:m.a.bool,hasMore:m.a.bool,isAccount:m.a.bool,multiColumn:m.a.bool}),D=N))||D}}]);
//# sourceMappingURL=account_gallery.js.map
\ No newline at end of file