@enigmax/dashboard 0.1.29 → 0.1.31

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 +21 -3
  2. package/package.json +1 -1
package/assets/index.html CHANGED
@@ -229,9 +229,10 @@
229
229
  .achip.on { background: var(--good); color: #06210f; border-color: var(--good); }
230
230
  .achip svg { width: 14px; height: 14px; display: block; }
231
231
  /* Inline app icons in the "where deployed" tag (static, name in tooltip). */
232
- .aicons { display: inline-flex; gap: 5px; align-items: center; vertical-align: middle; }
232
+ .aicons { display: inline-flex; gap: 5px; align-items: center; vertical-align: middle; margin-left: 6px; }
233
233
  .aicon { display: inline-flex; align-items: center; color: var(--muted); }
234
234
  .aicon svg { width: 14px; height: 14px; display: block; }
235
+ .set-ic { vertical-align: middle; margin-right: 7px; }
235
236
  /* List settings (guard block/allow globs, custom secret patterns): chips + add input. A list row spans the full grid width. */
236
237
  .set-row.list { grid-column: 1 / -1; align-items: stretch; flex-direction: column; }
237
238
  .lchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@@ -2101,6 +2102,23 @@ export {
2101
2102
  return esc(name) + badges.map(([t, c]) => ' <span class="tag ' + c + '">' + esc(t) + "</span>").join("");
2102
2103
  }
2103
2104
 
2105
+ // App-specific settings (per-agent approval bypass) get the app's logo prefixed to
2106
+ // the label, so the Permissions list reads at a glance. AGENT_ICONS is defined below
2107
+ // but only referenced at render time, so it is initialised by then.
2108
+ const AGENT_LABEL_BY_NAME = { claude: "Claude Code", codex: "OpenAI Codex", opencode: "OpenCode" };
2109
+ const GH_ICON = '<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.52 11.52 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222 0 1.606-.014 2.898-.014 3.293 0 .322.216.694.825.576C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>';
2110
+ // Map a setting key to the app/service logo prefixed to its label (per-agent bypass,
2111
+ // the Claude-specific toggles, and the GitHub telemetry toggle).
2112
+ function settingIcon(key) {
2113
+ key = key || "";
2114
+ let svg = "", title = "";
2115
+ const bp = /^bypass-(claude|codex|opencode)$/.exec(key);
2116
+ if (bp) { svg = (typeof AGENT_ICONS !== "undefined" && AGENT_ICONS[bp[1]]) || ""; title = AGENT_LABEL_BY_NAME[bp[1]]; }
2117
+ else if (key === "claude-attribution" || key === "claude-survey" || key === "proxy") { svg = (typeof AGENT_ICONS !== "undefined" && AGENT_ICONS.claude) || ""; title = "Claude Code"; }
2118
+ else if (key === "gh-telemetry") { svg = GH_ICON; title = "GitHub"; }
2119
+ return svg ? '<span class="aicon set-ic" title="' + esc(title) + '" aria-hidden="true">' + svg + "</span>" : "";
2120
+ }
2121
+
2104
2122
  function settingRow(s) {
2105
2123
  if (s.kind === "list") {
2106
2124
  const items = s.items || [];
@@ -2111,7 +2129,7 @@ export {
2111
2129
  const adder = '<div class="ladd"><input type="text" class="linput" data-skey="' + esc(s.key)
2112
2130
  + '" placeholder="' + esc(s.itemHint || "add an entry...") + '">'
2113
2131
  + '<button type="button" class="laddb" data-skey="' + esc(s.key) + '">Add</button></div>';
2114
- return '<div class="set-row list"><div class="set-meta"><div class="set-name">' + labelWithBadges(s.label) + "</div>"
2132
+ return '<div class="set-row list"><div class="set-meta"><div class="set-name">' + settingIcon(s.key) + labelWithBadges(s.label) + "</div>"
2115
2133
  + '<div class="set-hint">' + esc(s.hint) + (s.globalOnly ? " · global" : "") + "</div>"
2116
2134
  + chips + adder + "</div></div>";
2117
2135
  }
@@ -2124,7 +2142,7 @@ export {
2124
2142
  + "</select>"
2125
2143
  : '<button type="button" class="toggle' + (s.value ? " on" : "") + '" data-skey="' + esc(s.key)
2126
2144
  + '" data-kind="bool" data-on="' + (s.value ? 1 : 0) + '">' + (s.value ? "On" : "Off") + "</button>";
2127
- return '<div class="set-row"><div class="set-meta"><div class="set-name">' + labelWithBadges(s.label) + "</div>"
2145
+ return '<div class="set-row"><div class="set-meta"><div class="set-name">' + settingIcon(s.key) + labelWithBadges(s.label) + "</div>"
2128
2146
  + '<div class="set-hint">' + esc(s.hint) + (s.globalOnly ? " · global" : "") + "</div></div>"
2129
2147
  + '<div class="set-ctl">' + ctl + "</div></div>";
2130
2148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/dashboard",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
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": [