@enigmax/dashboard 0.1.21 → 0.1.22

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/assets/index.html CHANGED
@@ -2183,10 +2183,13 @@ export {
2183
2183
  const res = await fetch("/api/update", { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" });
2184
2184
  const out = await res.json();
2185
2185
  if (!out.ok) { $("updateNote").textContent = "Update failed: " + (out.error || "error"); return; }
2186
- // The UI bundle may have been refreshed server-side; reload so the browser
2187
- // picks up the new dashboard and fresh data automatically.
2188
- $("updateNote").textContent = (out.note || "Updated.") + " Refreshing the dashboard...";
2189
- setTimeout(() => location.reload(), 1200);
2186
+ // Only reload when something actually changed; an up-to-date check just reports.
2187
+ if (out.changed) {
2188
+ $("updateNote").textContent = (out.note || "Updated.") + " Refreshing the dashboard...";
2189
+ setTimeout(() => location.reload(), 1200);
2190
+ } else {
2191
+ $("updateNote").textContent = out.note || "Already up to date.";
2192
+ }
2190
2193
  } catch { $("updateNote").textContent = "Could not reach the server to update."; }
2191
2194
  }
2192
2195
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/dashboard",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Local browser dashboard UI for enigma: the static page and chart assets enigma serves on its loopback dashboard (savings, real tool usage, in-browser settings). Installed on demand by enigma-cli; not a runtime dependency.",
5
5
  "type": "module",
6
6
  "files": [