From efa234d010d5352f132161c1a21963d98b59ad8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20S=C3=A1nchez?= Date: Thu, 20 Aug 2026 08:56:36 -0600 Subject: [PATCH 1/2] feat[frontend](tenants): make tenant card click enter the tenant --- .../src/features/tenants/components/TenantCard.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/tenants/components/TenantCard.tsx b/frontend/src/features/tenants/components/TenantCard.tsx index 08e19f467..8782b2bdb 100644 --- a/frontend/src/features/tenants/components/TenantCard.tsx +++ b/frontend/src/features/tenants/components/TenantCard.tsx @@ -198,13 +198,16 @@ export function TenantCard({ const hue = hueOf(tenant.name || tenant.domain) const initial = (tenant.name || tenant.domain).charAt(0).toUpperCase() const terminated = tenant.status === 'TERMINATED' + const canEnter = readable && !terminated return (
enterTenant(tenant) : undefined} className={cn( 'group relative flex flex-col overflow-hidden rounded-xl border border-border bg-card shadow-sm transition-all duration-200', readable ? 'hover:border-primary/40 hover:shadow-md' : 'opacity-60 saturate-[0.35]', - terminated && 'opacity-50' + terminated && 'opacity-50', + canEnter && 'cursor-pointer' )} >
-
+
e.stopPropagation()} + > + {open && ( +
+
+ + {tenants.map((tn) => ( + + ))} +
+ +
+ )} + {creating && ( + setCreating(false)} + onCreated={() => { + setCreating(false) + void load() + }} + /> + )} +
+ ) +} diff --git a/frontend/src/shared/i18n/locales/en.json b/frontend/src/shared/i18n/locales/en.json index ad0950b77..e7c52f6a4 100644 --- a/frontend/src/shared/i18n/locales/en.json +++ b/frontend/src/shared/i18n/locales/en.json @@ -5472,6 +5472,11 @@ "notFound": "Tenant not found", "invalidRequest": "Invalid request", "operationFailed": "Operation failed" + }, + "switcher": { + "aria": "Switch tenant", + "self": "Default tenant", + "create": "Create tenant" } }, "supportAccess": { diff --git a/frontend/src/shared/layouts/DashboardLayout/Topbar.tsx b/frontend/src/shared/layouts/DashboardLayout/Topbar.tsx index a1d42458e..180132096 100644 --- a/frontend/src/shared/layouts/DashboardLayout/Topbar.tsx +++ b/frontend/src/shared/layouts/DashboardLayout/Topbar.tsx @@ -28,6 +28,7 @@ import { useCurrentInstanceId } from '@/shared/lib/current-instance' import { InstanceSelector } from '@/features/federation/components/InstanceSelector' import { useFederationVersion } from '@/features/federation/hooks/use-version' import { useBilling } from '@/features/billing' +import { TenantSwitcher } from '@/features/tenants/components/TenantSwitcher' import { NotificationRow, useNotificationFeed, @@ -196,6 +197,7 @@ export function Topbar() { {/* Right cluster */}
+