querysub 0.299.0 → 0.300.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.299.0",
3
+ "version": "0.300.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",
@@ -57,7 +57,7 @@ const notifyClients = throttleFunction(timeInMinute, async function notifyClient
57
57
  let currentNotification: { close: () => void } | null = null;
58
58
  let curHash = "";
59
59
  function onLiveHashChange(liveHash: string, refreshThresholdTime: number) {
60
- console.log(blue(`Client liveHash changed ${liveHash}, prev hash: ${curHash}`));
60
+ console.log(blue(`Received client liveHash ${liveHash}, prev hash: ${curHash}`));
61
61
  if (liveHash === curHash) return;
62
62
  let prevHash = curHash;
63
63
  // Don't notify the user right away. Hopefully they refresh naturally, and we never have to notify them at all!
@@ -125,9 +125,11 @@ function onLiveHashChange(liveHash: string, refreshThresholdTime: number) {
125
125
  <button
126
126
  className={css.pad(8, 16).hsl(200, 50, 50).color("white").pointer}
127
127
  onClick={(e) => {
128
- Querysub.localCommit(() => {
129
- liveHashOverrideURL.value = { liveHash, time: Date.now() };
130
- });
128
+ if (!liveHash.startsWith("forced")) {
129
+ Querysub.localCommit(() => {
130
+ liveHashOverrideURL.value = { liveHash, time: Date.now() };
131
+ });
132
+ }
131
133
  window.location.reload();
132
134
  }}
133
135
  >