querysub 0.262.0 → 0.263.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.262.0",
3
+ "version": "0.263.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -32,7 +32,7 @@ export function startEdgeNotifier() {
32
32
  }
33
33
 
34
34
  let watchingClientNodes = new Set<string>();
35
- const notifyClients = throttleFunction(timeInMinute * 5, async function notifyClients(liveHash: string, refreshThresholdTime: number) {
35
+ const notifyClients = throttleFunction(timeInMinute, async function notifyClients(liveHash: string, refreshThresholdTime: number) {
36
36
  // Wait, so the servers have time to load the new code. We tell the servers to preload but apparently there's some kind of lag, So we'll just delay here.
37
37
  console.log(blue(`Waiting 30 seconds before notifying clients about liveHash ${liveHash}`));
38
38
  await delay(30 * 1000);
@@ -80,9 +80,17 @@ function onLiveHashChange(liveHash: string, refreshThresholdTime: number) {
80
80
  liveHashOverrideURL.value = { liveHash, time: Date.now() };
81
81
  });
82
82
  if (!skipFirst) {
83
+ if (currentNotification) {
84
+ currentNotification.close();
85
+ currentNotification = null;
86
+ }
83
87
  // Show notification modal
84
- currentNotification = {
88
+ let nextNotification = {
85
89
  close: showModal({
90
+ onClose: () => {
91
+ if (currentNotification !== nextNotification) return;
92
+ currentNotification = null;
93
+ },
86
94
  content: (
87
95
  <div
88
96
  title={`Live Hash: ${liveHash}, prev hash: ${prevHash}`}
@@ -130,6 +138,7 @@ function onLiveHashChange(liveHash: string, refreshThresholdTime: number) {
130
138
  )
131
139
  }).close
132
140
  };
141
+ currentNotification = nextNotification;
133
142
  }
134
143
  skipFirst = false;
135
144
 
@@ -268,6 +268,7 @@ export class DeployPage extends qreact.Component {
268
268
  <div className={css.hbox(10)}>
269
269
  <UpdateButtons services={[]} />
270
270
  <button
271
+ disabled={controller.isAnyLoading()}
271
272
  className={buttonStyle.alignSelf("stretch").center.hsl(240, 70, 50).colorhsl(0, 0, 100)
272
273
  + (anyUncommitted && css.opacity(0.5))
273
274
  + (this.state.isDeploying && css.opacity(0.7))
@@ -2,6 +2,7 @@ import { css } from "typesafecss";
2
2
  import { qreact } from "../../4-dom/qreact";
3
3
  import { formatDateJSX } from "../../misc/formatJSX";
4
4
  import { formatTime } from "socket-function/src/formatting/format";
5
+ import { Querysub } from "../../4-querysub/QuerysubController";
5
6
 
6
7
  module.hotreload = true;
7
8
 
@@ -36,7 +37,7 @@ export function DeployProgressView({ stages, isDeploying, deploySuccess, deployS
36
37
  }) {
37
38
  if (!isDeploying && !deploySuccess) return null;
38
39
 
39
- const now = Date.now();
40
+ const now = Querysub.timeDelayed(1000);
40
41
  const elapsed = (deployEndTime || now) - (deployStartTime || now);
41
42
 
42
43
  // Separate pending and finished stages