Seth commited on
Commit ·
dcd1e34
1
Parent(s): ced5eff
update
Browse files- .DS_Store +0 -0
- frontend/.DS_Store +0 -0
- frontend/src/pages/APIKeys.jsx +53 -14
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
frontend/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
frontend/src/pages/APIKeys.jsx
CHANGED
|
@@ -277,21 +277,60 @@ export default function APIKeys() {
|
|
| 277 |
)}
|
| 278 |
</div>
|
| 279 |
<div className="ml-8 space-y-2">
|
| 280 |
-
<div className="flex items-center gap-2
|
| 281 |
-
<
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
<div className="flex items-center gap-4 text-xs text-slate-400">
|
| 296 |
<div className="flex items-center gap-1">
|
| 297 |
<Clock className="h-3 w-3" />
|
|
|
|
| 277 |
)}
|
| 278 |
</div>
|
| 279 |
<div className="ml-8 space-y-2">
|
| 280 |
+
<div className="flex items-center gap-2">
|
| 281 |
+
<div className="flex items-center gap-2 flex-1 min-w-0">
|
| 282 |
+
<span className="font-mono text-sm text-slate-500 break-all">
|
| 283 |
+
{key.key_prefix}
|
| 284 |
+
</span>
|
| 285 |
+
<Button
|
| 286 |
+
size="sm"
|
| 287 |
+
variant="ghost"
|
| 288 |
+
onClick={() => copyToClipboard(key.key_prefix, key.id)}
|
| 289 |
+
className="h-6 px-2 flex-shrink-0"
|
| 290 |
+
title="Copy prefix"
|
| 291 |
+
>
|
| 292 |
+
{copiedKeyId === key.id ? (
|
| 293 |
+
<Check className="h-3 w-3 text-emerald-600" />
|
| 294 |
+
) : (
|
| 295 |
+
<Copy className="h-3 w-3" />
|
| 296 |
+
)}
|
| 297 |
+
</Button>
|
| 298 |
+
<Button
|
| 299 |
+
size="sm"
|
| 300 |
+
variant="ghost"
|
| 301 |
+
onClick={() => toggleKeyVisibility(key.id)}
|
| 302 |
+
className="h-6 px-2 flex-shrink-0"
|
| 303 |
+
title={visibleKeys.has(key.id) ? "Hide info" : "Show info"}
|
| 304 |
+
>
|
| 305 |
+
{visibleKeys.has(key.id) ? (
|
| 306 |
+
<EyeOff className="h-3 w-3" />
|
| 307 |
+
) : (
|
| 308 |
+
<Eye className="h-3 w-3" />
|
| 309 |
+
)}
|
| 310 |
+
</Button>
|
| 311 |
+
</div>
|
| 312 |
</div>
|
| 313 |
+
{visibleKeys.has(key.id) && (
|
| 314 |
+
<motion.div
|
| 315 |
+
initial={{ opacity: 0, height: 0 }}
|
| 316 |
+
animate={{ opacity: 1, height: "auto" }}
|
| 317 |
+
exit={{ opacity: 0, height: 0 }}
|
| 318 |
+
className="mt-2 p-3 bg-amber-50 border border-amber-200 rounded-lg"
|
| 319 |
+
>
|
| 320 |
+
<div className="flex items-start gap-2">
|
| 321 |
+
<AlertCircle className="h-4 w-4 text-amber-600 flex-shrink-0 mt-0.5" />
|
| 322 |
+
<div className="flex-1">
|
| 323 |
+
<p className="text-xs text-amber-800 font-medium mb-1">
|
| 324 |
+
Full API Key Not Available
|
| 325 |
+
</p>
|
| 326 |
+
<p className="text-xs text-amber-700">
|
| 327 |
+
For security reasons, the full API key is only shown once when it's created.
|
| 328 |
+
Only the prefix is stored. If you need the full key, create a new one.
|
| 329 |
+
</p>
|
| 330 |
+
</div>
|
| 331 |
+
</div>
|
| 332 |
+
</motion.div>
|
| 333 |
+
)}
|
| 334 |
<div className="flex items-center gap-4 text-xs text-slate-400">
|
| 335 |
<div className="flex items-center gap-1">
|
| 336 |
<Clock className="h-3 w-3" />
|