@chrysb/alphaclaw 0.1.18 → 0.1.20

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.
@@ -48,12 +48,12 @@ body::before {
48
48
  .scope-btn { background: rgba(255,255,255,0.03); color: var(--text-muted); border: 1px solid var(--border); transition: all 0.15s; }
49
49
  .scope-btn:hover { border-color: var(--text-dim); color: var(--text); }
50
50
  .scope-btn-read.active {
51
- background: rgba(255, 255, 255, 0.12);
51
+ background: rgba(255, 255, 255, 0.03);
52
52
  color: #f3f4f6;
53
53
  border-color: rgba(255, 255, 255, 0.35);
54
54
  }
55
55
  .scope-btn-write.active {
56
- background: rgba(255, 255, 255, 0.12);
56
+ background: rgba(255, 255, 255, 0.03);
57
57
  color: #f3f4f6;
58
58
  border-color: rgba(255, 255, 255, 0.35);
59
59
  }
@@ -113,3 +113,37 @@ body::before {
113
113
  color: #a4f3ff;
114
114
  background: rgba(99, 235, 255, 0.08);
115
115
  }
116
+
117
+ .ac-btn-green {
118
+ border: 1px solid rgba(34, 197, 94, 0.45);
119
+ background: linear-gradient(
120
+ 180deg,
121
+ rgba(34, 197, 94, 0.2) 0%,
122
+ rgba(34, 197, 94, 0.12) 100%
123
+ );
124
+ color: #86efac;
125
+ box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
126
+ transition:
127
+ border-color 0.15s ease,
128
+ background 0.15s ease,
129
+ color 0.15s ease,
130
+ box-shadow 0.15s ease,
131
+ transform 0.15s ease;
132
+ }
133
+
134
+ .ac-btn-green:hover:not(:disabled) {
135
+ border-color: rgba(34, 197, 94, 0.7);
136
+ background: linear-gradient(
137
+ 180deg,
138
+ rgba(34, 197, 94, 0.28) 0%,
139
+ rgba(34, 197, 94, 0.16) 100%
140
+ );
141
+ color: #bbf7d0;
142
+ box-shadow:
143
+ inset 0 0 0 1px rgba(34, 197, 94, 0.2),
144
+ 0 0 12px rgba(34, 197, 94, 0.12);
145
+ }
146
+
147
+ .ac-btn-green:active:not(:disabled) {
148
+ transform: translateY(1px);
149
+ }
@@ -31,7 +31,7 @@ const kUiTabStorageKey = "alphaclaw_ui_tab";
31
31
  const kUiTabs = ["general", "models", "envars"];
32
32
  const kDefaultUiTab = "general";
33
33
 
34
- const GeneralTab = ({ onSwitchTab }) => {
34
+ const GeneralTab = ({ onSwitchTab, isActive }) => {
35
35
  const [googleKey, setGoogleKey] = useState(0);
36
36
  const [dashboardLoading, setDashboardLoading] = useState(false);
37
37
 
@@ -115,6 +115,11 @@ const GeneralTab = ({ onSwitchTab }) => {
115
115
  setGoogleKey((k) => k + 1);
116
116
  };
117
117
 
118
+ useEffect(() => {
119
+ if (!isActive) return;
120
+ fullRefresh();
121
+ }, [isActive]);
122
+
118
123
  useEffect(() => {
119
124
  if (!syncCron) return;
120
125
  setSyncCronEnabled(syncCron.enabled !== false);
@@ -424,7 +429,7 @@ function App() {
424
429
  <div class="app-content">
425
430
  <div class="max-w-2xl w-full mx-auto space-y-4">
426
431
  <div style=${{ display: tab === "general" ? "" : "none" }}>
427
- <${GeneralTab} onSwitchTab=${setTab} />
432
+ <${GeneralTab} onSwitchTab=${setTab} isActive=${tab === "general"} />
428
433
  </div>
429
434
  <div style=${{ display: tab === "models" ? "" : "none" }}>
430
435
  <${Models} />
@@ -55,7 +55,7 @@ const DeviceRow = ({ d, onApprove, onReject }) => {
55
55
  ${subtitle && html`<span class="text-xs text-gray-500">${subtitle}</span>`}
56
56
  </div>
57
57
  <div class="flex gap-2">
58
- <button onclick=${() => handle('approve')} class="bg-green-500 text-black text-xs font-medium px-3 py-1.5 rounded-lg hover:opacity-85">Approve</button>
58
+ <button onclick=${() => handle('approve')} class="ac-btn-green text-xs font-medium px-3 py-1.5 rounded-lg">Approve</button>
59
59
  <button onclick=${() => handle('reject')} class="bg-gray-800 text-gray-300 text-xs px-3 py-1.5 rounded-lg hover:bg-gray-700">Reject</button>
60
60
  </div>
61
61
  </div>`;
@@ -249,9 +249,7 @@ export const WelcomeFormStep = ({
249
249
  <button
250
250
  onclick=${goNext}
251
251
  disabled=${!currentGroupValid}
252
- class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all ${currentGroupValid
253
- ? "bg-white text-black hover:opacity-85"
254
- : "bg-gray-800 text-gray-500 cursor-not-allowed"}"
252
+ class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all ac-btn-cyan"
255
253
  >
256
254
  Next
257
255
  </button>
@@ -268,10 +266,7 @@ export const WelcomeFormStep = ({
268
266
  <button
269
267
  onclick=${handleSubmit}
270
268
  disabled=${!allValid || loading}
271
- class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all ${allValid &&
272
- !loading
273
- ? "bg-white text-black hover:opacity-85"
274
- : "bg-gray-800 text-gray-500 cursor-not-allowed"}"
269
+ class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all ac-btn-cyan"
275
270
  >
276
271
  ${loading ? "Starting..." : "Complete Setup"}
277
272
  </button>
@@ -37,7 +37,7 @@ const PairingRow = ({ p, onApprove, onReject }) => {
37
37
  <div class="bg-black/30 rounded-lg p-3 mb-2">
38
38
  <div class="font-medium text-sm mb-2">${label} · <code class="text-gray-400">${p.code || p.id || '?'}</code></div>
39
39
  <div class="flex gap-2">
40
- <button onclick=${() => handle("approve")} class="bg-green-500 text-black text-xs font-medium px-3 py-1.5 rounded-lg hover:opacity-85">Approve</button>
40
+ <button onclick=${() => handle("approve")} class="ac-btn-green text-xs font-medium px-3 py-1.5 rounded-lg">Approve</button>
41
41
  <button onclick=${() => handle("reject")} class="bg-gray-800 text-gray-300 text-xs px-3 py-1.5 rounded-lg hover:bg-gray-700">Reject</button>
42
42
  </div>
43
43
  </div>`;
@@ -60,9 +60,9 @@
60
60
  id="submit-btn"
61
61
  type="submit"
62
62
  disabled
63
- class="w-full text-sm font-medium px-4 py-2 rounded-lg bg-gray-800 text-gray-500 cursor-not-allowed"
63
+ class="w-full text-sm font-medium px-4 py-2 rounded-lg ac-btn-cyan"
64
64
  >
65
- Continue
65
+ Enter
66
66
  </button>
67
67
  </form>
68
68
  </div>
@@ -71,22 +71,9 @@
71
71
  const passwordEl = document.getElementById("password");
72
72
  const submitButtonEl = document.getElementById("submit-btn");
73
73
 
74
- const kEnabledClasses = ["bg-white", "text-black", "hover:opacity-85"];
75
- const kDisabledClasses = [
76
- "bg-gray-800",
77
- "text-gray-500",
78
- "cursor-not-allowed",
79
- ];
80
-
81
74
  const syncButtonState = () => {
82
75
  const hasValue = passwordEl.value.length > 0;
83
76
  submitButtonEl.disabled = !hasValue;
84
- kEnabledClasses.forEach((c) =>
85
- submitButtonEl.classList.toggle(c, hasValue),
86
- );
87
- kDisabledClasses.forEach((c) =>
88
- submitButtonEl.classList.toggle(c, !hasValue),
89
- );
90
77
  };
91
78
 
92
79
  passwordEl.addEventListener("input", syncButtonState);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrysb/alphaclaw",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },