@chrysb/alphaclaw 0.1.18 → 0.1.19
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/lib/public/css/theme.css
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
+
}
|
package/lib/public/js/app.js
CHANGED
|
@@ -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="
|
|
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>`;
|
|
@@ -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="
|
|
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>`;
|