Spaces:
Runtime error
Runtime error
fix: improve workspace creation discoverability in super admin
Browse files- Add prominent '+ Add Workspace' button in the Super Admin header
(always visible, next to Refresh)
- Replace hidden 'Show Create Client Instance' toggle with a clear
'Create New Workspace' section with close (×) button
- Highlight the create form with primary border when open
- Improve instructional text for the creation workflow
Fixes #169
src/components/panels/super-admin-panel.tsx
CHANGED
|
@@ -409,12 +409,20 @@ export function SuperAdminPanel() {
|
|
| 409 |
Multi-tenant provisioning control plane with approval gates and safer destructive actions.
|
| 410 |
</p>
|
| 411 |
</div>
|
| 412 |
-
<
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 418 |
</div>
|
| 419 |
|
| 420 |
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3">
|
|
@@ -452,17 +460,21 @@ export function SuperAdminPanel() {
|
|
| 452 |
</div>
|
| 453 |
)}
|
| 454 |
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
className="
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 463 |
<div className="p-4 space-y-3">
|
| 464 |
<div className="text-xs text-muted-foreground">
|
| 465 |
-
|
| 466 |
</div>
|
| 467 |
{gatewayLoadError && (
|
| 468 |
<div className="px-3 py-2 rounded-md text-xs border bg-amber-500/10 text-amber-300 border-amber-500/20">
|
|
@@ -540,8 +552,8 @@ export function SuperAdminPanel() {
|
|
| 540 |
</button>
|
| 541 |
</div>
|
| 542 |
</div>
|
| 543 |
-
)}
|
| 544 |
</div>
|
|
|
|
| 545 |
|
| 546 |
<div className="rounded-lg border border-border bg-card overflow-hidden">
|
| 547 |
<div className="px-3 py-2 border-b border-border flex items-center gap-2">
|
|
|
|
| 409 |
Multi-tenant provisioning control plane with approval gates and safer destructive actions.
|
| 410 |
</p>
|
| 411 |
</div>
|
| 412 |
+
<div className="flex items-center gap-2">
|
| 413 |
+
<button
|
| 414 |
+
onClick={() => setCreateExpanded(true)}
|
| 415 |
+
className="h-8 px-4 rounded-md bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90 transition-smooth"
|
| 416 |
+
>
|
| 417 |
+
+ Add Workspace
|
| 418 |
+
</button>
|
| 419 |
+
<button
|
| 420 |
+
onClick={load}
|
| 421 |
+
className="h-8 px-3 rounded-md border border-border text-sm text-foreground hover:bg-secondary/60 transition-smooth"
|
| 422 |
+
>
|
| 423 |
+
Refresh
|
| 424 |
+
</button>
|
| 425 |
+
</div>
|
| 426 |
</div>
|
| 427 |
|
| 428 |
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3">
|
|
|
|
| 460 |
</div>
|
| 461 |
)}
|
| 462 |
|
| 463 |
+
{createExpanded && (
|
| 464 |
+
<div className="rounded-lg border border-primary/30 bg-card overflow-hidden">
|
| 465 |
+
<div className="px-4 py-3 border-b border-border flex items-center justify-between">
|
| 466 |
+
<h3 className="text-sm font-medium text-foreground">Create New Workspace</h3>
|
| 467 |
+
<button
|
| 468 |
+
onClick={() => setCreateExpanded(false)}
|
| 469 |
+
className="text-muted-foreground hover:text-foreground text-lg leading-none transition-smooth"
|
| 470 |
+
aria-label="Close create form"
|
| 471 |
+
>
|
| 472 |
+
×
|
| 473 |
+
</button>
|
| 474 |
+
</div>
|
| 475 |
<div className="p-4 space-y-3">
|
| 476 |
<div className="text-xs text-muted-foreground">
|
| 477 |
+
Fill in the workspace details below and click <span className="text-foreground font-medium">Create + Queue</span> to provision a new client instance.
|
| 478 |
</div>
|
| 479 |
{gatewayLoadError && (
|
| 480 |
<div className="px-3 py-2 rounded-md text-xs border bg-amber-500/10 text-amber-300 border-amber-500/20">
|
|
|
|
| 552 |
</button>
|
| 553 |
</div>
|
| 554 |
</div>
|
|
|
|
| 555 |
</div>
|
| 556 |
+
)}
|
| 557 |
|
| 558 |
<div className="rounded-lg border border-border bg-card overflow-hidden">
|
| 559 |
<div className="px-3 py-2 border-b border-border flex items-center gap-2">
|