X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Ffeatures%2Fpinned_statuses.js;h=7406920a2e7f9b77f6687c07e1dee81d96bad81d;hb=d9cb8acd3e43f2b3502f2b08ce469483c67789f6;hp=a73f599176ca8b6f966c0ab9e9a4c03a692ae7c1;hpb=726b131b0a675a1116e579e0c1adbed8e5a1a856;p=akkoma diff --git a/priv/static/packs/features/pinned_statuses.js b/priv/static/packs/features/pinned_statuses.js index a73f59917..7406920a2 100644 --- a/priv/static/packs/features/pinned_statuses.js +++ b/priv/static/packs/features/pinned_statuses.js @@ -1,2 +1,2 @@ -webpackJsonp([11],{153:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var o=n(2),i=n.n(o),r=n(1),s=n.n(r),a=n(3),c=n.n(a),l=n(4),u=n.n(l),d=n(0),h=n.n(d),f=n(10),p=n.n(f),b=function(e){function t(){var n,o,i;s()(this,t);for(var r=arguments.length,a=Array(r),l=0;le.scrollHeight-t-e.clientHeight&&o.props.onLoadMore&&!o.props.isLoading&&o.props.onLoadMore(),t<100&&o.props.onScrollToTop?o.props.onScrollToTop():o.props.onScroll&&o.props.onScroll()}},150,{trailing:!0}),o.onFullScreenChange=function(){o.setState({fullscreen:Object(S.d)()})},o.setRef=function(e){o.node=e},o.handleLoadMore=function(e){e.preventDefault(),o.props.onLoadMore()},i=n,u()(o,i)}return h()(t,e),t.prototype.componentDidMount=function(){this.attachScrollListener(),this.attachIntersectionObserver(),Object(S.a)(this.onFullScreenChange),this.handleScroll()},t.prototype.getSnapshotBeforeUpdate=function(e){return g.a.Children.count(e.children)>0&&g.a.Children.count(e.children)0?this.node.scrollHeight-this.node.scrollTop:null},t.prototype.componentDidUpdate=function(e,t,n){if(null!==n){var o=this.node.scrollHeight-n;this.node.scrollTop!==o&&(this.node.scrollTop=o)}},t.prototype.componentWillUnmount=function(){this.detachScrollListener(),this.detachIntersectionObserver(),Object(S.b)(this.onFullScreenChange)},t.prototype.attachIntersectionObserver=function(){this.intersectionObserverWrapper.connect({root:this.node,rootMargin:"300% 0px"})},t.prototype.detachIntersectionObserver=function(){this.intersectionObserverWrapper.disconnect()},t.prototype.attachScrollListener=function(){this.node.addEventListener("scroll",this.handleScroll)},t.prototype.detachScrollListener=function(){this.node.removeEventListener("scroll",this.handleScroll)},t.prototype.getFirstChildKey=function(e){var t=e.children,n=t;return t instanceof k.List?n=t.get(0):Array.isArray(t)&&(n=t[0]),n&&n.key},t.prototype.render=function(){var e=this,t=this.props,n=t.children,o=t.scrollKey,i=t.trackScroll,r=t.shouldUpdateScroll,a=t.isLoading,c=t.hasMore,l=t.prepend,u=t.emptyMessage,d=t.onLoadMore,h=this.state.fullscreen,f=g.a.Children.count(n),p=c&&f>0&&d?s()(M.a,{visible:!a,onClick:this.handleLoadMore}):null,b=null;return b=a||f>0||!u?g.a.createElement("div",{className:j()("scrollable",{fullscreen:h}),ref:this.setRef},s()("div",{role:"feed",className:"item-list"},void 0,l,g.a.Children.map(this.props.children,function(t,n){return s()(O.a,{id:t.key,index:n,listLength:f,intersectionObserverWrapper:e.intersectionObserverWrapper,saveHeightKey:i?e.context.router.route.location.key+":"+o:null},t.key,t)}),p)):g.a.createElement("div",{className:"empty-column-indicator",ref:this.setRef},u),i?s()(v.a,{scrollKey:o,shouldUpdateScroll:r},void 0,b):b},t}(b.PureComponent),o.contextTypes={router:y.a.object},o.defaultProps={trackScroll:!0},i)},288:function(e,t,n){"use strict";var o=n(9),i=n(289),r=n(94),s=function(e,t){return{cachedHeight:e.getIn(["height_cache",t.saveHeightKey,t.id])}},a=function(e){return{onHeightChange:function(t,n,o){e(Object(r.d)(t,n,o))}}};t.a=Object(o.connect)(s,a)(i.a)},289:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var o=n(1),i=n.n(o),r=n(3),s=n.n(r),a=n(4),c=n.n(a),l=n(0),u=n.n(l),d=n(290),h=n(292),f=n(8),p=(n.n(f),["id","index","listLength"]),b=["id","index","listLength","cachedHeight"],g=function(e){function t(){var n,o,r;i()(this,t);for(var a=arguments.length,c=Array(a),l=0;l0;)a.shift()();a.length?requestIdleCallback(o):c=!1}function i(e){a.push(e),c||(c=!0,requestIdleCallback(o))}var r=n(291),s=n.n(r),a=new s.a,c=!1;t.a=i},291:function(e,t,n){"use strict";function o(){this.length=0}o.prototype.push=function(e){var t={item:e};this.last?this.last=this.last.next=t:this.last=this.first=t,this.length++},o.prototype.shift=function(){var e=this.first;if(e)return this.first=e.next,--this.length||(this.last=void 0),e.item},o.prototype.slice=function(e,t){e=void 0===e?0:e,t=void 0===t?1/0:t;for(var n=[],o=0,i=this.first;i&&!(--t<0);i=i.next)++o>e&&n.push(i.item);return n},e.exports=o},292:function(e,t,n){"use strict";function o(e){if("boolean"!=typeof i){var t=e.target.getBoundingClientRect(),n=e.boundingClientRect;i=t.height!==n.height||t.top!==n.top||t.width!==n.width||t.bottom!==n.bottom||t.left!==n.left||t.right!==n.right}return i?e.target.getBoundingClientRect():e.boundingClientRect}var i=void 0;t.a=o},293:function(e,t,n){"use strict";var o=n(1),i=n.n(o),r=function(){function e(){i()(this,e),this.callbacks={},this.observerBacklog=[],this.observer=null}return e.prototype.connect=function(e){var t=this,n=function(e){e.forEach(function(e){var n=e.target.getAttribute("data-id");t.callbacks[n]&&t.callbacks[n](e)})};this.observer=new IntersectionObserver(n,e),this.observerBacklog.forEach(function(e){var n=e[0],o=e[1],i=e[2];t.observe(n,o,i)}),this.observerBacklog=null},e.prototype.observe=function(e,t,n){this.observer?(this.callbacks[e]=n,this.observer.observe(t)):this.observerBacklog.push([e,t,n])},e.prototype.unobserve=function(e,t){this.observer&&(delete this.callbacks[e],this.observer.unobserve(t))},e.prototype.disconnect=function(){this.observer&&(this.callbacks={},this.observer.disconnect(),this.observer=null)},e}();t.a=r},294:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var o,i=n(2),r=n.n(i),s=n(1),a=n.n(s),c=n(3),l=n.n(c),u=n(4),d=n.n(u),h=n(0),f=n.n(h),p=n(7),b=Object(p.f)({load_more:{id:"status.load_more",defaultMessage:"Load more"}}),g=Object(p.g)(o=function(e){function t(){var n,o,i;a()(this,t);for(var r=arguments.length,s=Array(r),c=0;c0?n.map(function(t,o){return null===t?c()(_.a,{disabled:a,maxId:o>0?n.get(o-1):null,onClick:i},"gap:"+n.get(o+1)):c()(j.a,{id:t,onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},t)}):null;return l&&o&&(l=o.map(function(t){return c()(j.a,{id:t,featured:!0,onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},"f-"+t)}).concat(l)),O.a.createElement(L.a,s()({},r,{onLoadMore:i&&this.handleLoadOlder,ref:this.setRef}),l)},t}(R.a),o.propTypes={scrollKey:I.a.string.isRequired,statusIds:C.a.list.isRequired,featuredStatusIds:C.a.list,onLoadMore:I.a.func,onScrollToTop:I.a.func,onScroll:I.a.func,trackScroll:I.a.bool,shouldUpdateScroll:I.a.func,isLoading:I.a.bool,isPartial:I.a.bool,hasMore:I.a.bool,prepend:I.a.node,emptyMessage:I.a.node},o.defaultProps={trackScroll:!0},i)},297:function(e,t,n){"use strict";n.d(t,"a",function(){return p});var o=n(2),i=n.n(o),r=n(1),s=n.n(r),a=n(3),c=n.n(a),l=n(4),u=n.n(l),d=n(0),h=(n.n(d),n(7)),f=n(285),p=function(e){function t(){return s()(this,t),c()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.render=function(){return i()("div",{className:"column-back-button--slim"},void 0,i()("div",{role:"button",tabIndex:"0",onClick:this.handleClick,className:"column-back-button column-back-button--slim-button"},void 0,i()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),i()(h.b,{id:"column_back_button.label",defaultMessage:"Back"})))},t}(f.a)},836:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return x});var o,i,r,s,a=n(2),c=n.n(a),l=n(1),u=n.n(l),d=n(3),h=n.n(d),f=n(4),p=n.n(f),b=n(0),g=n.n(b),v=n(9),m=n(5),y=n.n(m),O=n(14),M=n.n(O),C=n(335),k=n(283),I=n(297),j=n(295),S=n(7),R=n(12),_=n.n(R),L=Object(S.f)({heading:{id:"column.pins",defaultMessage:"Pinned toot"}}),H=function(e){return{statusIds:e.getIn(["status_lists","pins","items"]),hasMore:!!e.getIn(["status_lists","pins","next"])}},x=(o=Object(v.connect)(H))(i=Object(S.g)((s=r=function(e){function t(){var n,o,i;u()(this,t);for(var r=arguments.length,s=Array(r),a=0;a