@enigmax/dashboard 0.1.20 → 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.
Files changed (2) hide show
  1. package/assets/index.html +14 -6
  2. package/package.json +1 -1
package/assets/index.html CHANGED
@@ -181,6 +181,10 @@
181
181
  .toggle[data-kind="bool"]:hover { border-color: #2f3744; }
182
182
  .toggle[data-kind="bool"].on { background: var(--good); border-color: var(--good); }
183
183
  .toggle[data-kind="bool"].on::after { left: 23px; background: #06210f; }
184
+ /* Compact icon-only button (e.g. Edit), instead of a text button. */
185
+ .iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 30px; padding: 0; background: var(--surface2); color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: color .15s, border-color .15s; }
186
+ .iconbtn:hover { color: var(--accent); border-color: #2f3744; }
187
+ .iconbtn svg { width: 15px; height: 15px; display: block; }
184
188
  select.choice {
185
189
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
186
190
  border-radius: var(--radius-sm); padding: 6px 10px; font-size: 12px; font-family: var(--mono); cursor: pointer;
@@ -495,7 +499,7 @@
495
499
  <div class="page-head" style="display:flex;align-items:flex-start;gap:16px">
496
500
  <div style="flex:1">
497
501
  <h1>Skills</h1>
498
- <p>The skills installed in your agents - enigma's own and any external ones you added. Edit a skill's content, disable/enable or remove it, and check whether enigma's skills are up to date.</p>
502
+ <p>Engineering policy skills deployed to your agents - enigma's own, kept current automatically, plus any external skills found in your agent directories.</p>
499
503
  </div>
500
504
  <button id="skillsCheck" type="button" class="toggle on" style="white-space:nowrap">Check for updates</button>
501
505
  </div>
@@ -2179,10 +2183,13 @@ export {
2179
2183
  const res = await fetch("/api/update", { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" });
2180
2184
  const out = await res.json();
2181
2185
  if (!out.ok) { $("updateNote").textContent = "Update failed: " + (out.error || "error"); return; }
2182
- // The UI bundle may have been refreshed server-side; reload so the browser
2183
- // picks up the new dashboard and fresh data automatically.
2184
- $("updateNote").textContent = (out.note || "Updated.") + " Refreshing the dashboard...";
2185
- 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
+ }
2186
2193
  } catch { $("updateNote").textContent = "Could not reach the server to update."; }
2187
2194
  }
2188
2195
 
@@ -2264,7 +2271,8 @@ export {
2264
2271
  const upd = s.source !== "enigma" ? ""
2265
2272
  : s.update === "update" ? '<span class="tag warn">update available</span>'
2266
2273
  : s.update === "modified" ? '<span class="tag ext">modified</span>' : "";
2267
- const edit = '<button type="button" class="toggle" data-name="' + esc(s.name) + '" data-action="edit" data-enigma="' + (s.source === "enigma" ? 1 : 0) + '">Edit</button>';
2274
+ const edit = '<button type="button" class="iconbtn" title="Edit" aria-label="Edit" data-name="' + esc(s.name) + '" data-action="edit" data-enigma="' + (s.source === "enigma" ? 1 : 0) + '">'
2275
+ + '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"/></svg></button>';
2268
2276
  const main = s.source === "enigma"
2269
2277
  ? '<button type="button" class="toggle' + (s.discarded ? "" : " on") + '" data-kind="bool" title="'
2270
2278
  + (s.discarded ? "Disabled - click to enable" : "Enabled - click to disable") + '" data-name="' + esc(s.name)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/dashboard",
3
- "version": "0.1.20",
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": [