flexdesk 0.15.1 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/widgets.js CHANGED
@@ -560,6 +560,7 @@ function createAlertLog({ source = null, limit = 300 } = {}) {
560
560
 
561
561
  // src/ui/components/alerts_pane.js
562
562
  var CHIPS = [["all", "All"], ["alert", "Alert"], ["warning", "Warning"], ["info", "Info"]];
563
+ var MORE_WITHIN_PX = 48;
563
564
  function mountAlertsPane(host, {
564
565
  log,
565
566
  onOpen = null,
@@ -803,6 +804,16 @@ function mountAlertsPane(host, {
803
804
  q = input.value;
804
805
  paint();
805
806
  });
807
+ let loadingMore = false;
808
+ list.addEventListener("scroll", () => {
809
+ if (loadingMore || !log.hasMore()) return;
810
+ if (list.scrollTop + list.clientHeight < list.scrollHeight - MORE_WITHIN_PX) return;
811
+ loadingMore = true;
812
+ Promise.resolve(log.loadMore()).catch(() => {
813
+ }).finally(() => {
814
+ loadingMore = false;
815
+ });
816
+ });
806
817
  const unsubscribe = log.subscribe(() => paint());
807
818
  const timer = setInterval(paint, 6e4);
808
819
  paint();
@@ -7183,6 +7194,7 @@ export {
7183
7194
  HelpModal,
7184
7195
  ISO_DATE,
7185
7196
  ISO_DATETIME,
7197
+ MORE_WITHIN_PX,
7186
7198
  ManagedWindow,
7187
7199
  NotificationCenter,
7188
7200
  NotificationHistory,