Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvement(ui): migrate org access pages and KMS settings off V2 primitives (#8569)

Andrew Huanga9158a306842
diff --git a/frontend/src/pages/kms/SettingsPage/SettingsPage.tsx b/frontend/src/pages/kms/SettingsPage/SettingsPage.tsx
index 7d7e9ca97f..3472992a19 100644
--- a/frontend/src/pages/kms/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/kms/SettingsPage/SettingsPage.tsx
@@ -1,20 +1,11 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { TabPanel, Tabs } from "@app/components/v2";
import { LookingForOrgPageLink } from "@app/components/v3";
import { PageHeader } from "@app/components/v3/platform";
import { ProjectType } from "@app/hooks/api/projects/types";
import { ProjectGeneralTab } from "@app/pages/project/SettingsPage/components/ProjectGeneralTab";
-const tabs = [
- {
- name: "General",
- key: "tab-project-general",
- Component: ProjectGeneralTab
- }
-];
-
export const SettingsPage = () => {
const { t } = useTranslation();
@@ -31,13 +22,9 @@ export const SettingsPage = () => {
>
<LookingForOrgPageLink page="settings" />
</PageHeader>
- <Tabs orientation="vertical" defaultValue={tabs[0].key}>
- {tabs.map(({ key, Component }) => (
- <TabPanel className="pt-0" value={key} key={key}>
- <Component />
- </TabPanel>
- ))}
- </Tabs>
+ <div className="grow rounded-br-md rounded-bl-md pb-5 outline-hidden xl:overflow-x-hidden xl:pb-0">
+ <ProjectGeneralTab />
+ </div>
</div>
</div>
);
diff --git a/frontend/src/pages/organization/AccessManagementPage/AccessManagementPage.tsx b/frontend/src/pages/organization/AccessManagementPage/AccessManagementPage.tsx
index a4683fbcc0..a867505618 100644
--- a/frontend/src/pages/organization/AccessManagementPage/AccessManagementPage.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/AccessManagementPage.tsx
@@ -6,8 +6,8 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useNavigate, useSearch } from "@tanstack/react-router";
import { OrgPermissionGuardBanner } from "@app/components/permissions/OrgPermissionCan";
-import { Button } from "@app/components/v2";
import {
+ Button,
LookingForOrgPageLink,
Tabs,
TabsContent,
@@ -131,8 +131,8 @@ export const AccessManagementPage = () => {
hierarchy comparisons.
</p>
<Button
- colorSchema="primary"
- className="mt-2 w-fit text-xs"
+ variant={isSubOrganization ? "sub-org" : "org"}
+ className="mt-2"
onClick={() => setIsUpgradePrivilegeSystemModalOpen(true)}
>
Learn More & Upgrade
diff --git a/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupDetailsSection.tsx b/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupDetailsSection.tsx
index 9b40b3d083..ced3cd7666 100644
--- a/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupDetailsSection.tsx
+++ b/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupDetailsSection.tsx
@@ -2,7 +2,6 @@ import { format } from "date-fns";
import { CheckIcon, ClipboardListIcon, PencilIcon } from "lucide-react";
import { OrgPermissionCan } from "@app/components/permissions";
-import { Tooltip } from "@app/components/v2";
import {
Badge,
Card,
@@ -17,7 +16,10 @@ import {
DetailValue,
IconButton,
OrgIcon,
- SubOrgIcon
+ SubOrgIcon,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger
} from "@app/components/v3";
import { OrgPermissionGroupActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import { useTimedReset } from "@app/hooks";
@@ -81,17 +83,20 @@ export const GroupDetailsSection = ({ groupId, handlePopUpOpen, canEditGroup = t
<DetailLabel>ID</DetailLabel>
<DetailValue className="flex items-center gap-x-1">
{data.group.id}
- <Tooltip content="Copy group ID to clipboard">
- <IconButton
- onClick={() => {
- navigator.clipboard.writeText(data.group.id);
- setCopyTextId("Copied");
- }}
- variant="ghost"
- size="xs"
- >
- {isCopyingId ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
- </IconButton>
+ <Tooltip hoverable delayDuration={50}>
+ <TooltipTrigger asChild>
+ <IconButton
+ onClick={() => {
+ navigator.clipboard.writeText(data.group.id);
+ setCopyTextId("Copied");
+ }}
+ variant="ghost"
+ size="xs"
+ >
+ {isCopyingId ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
+ </IconButton>
+ </TooltipTrigger>
+ <TooltipContent>Copy group ID to clipboard</TooltipContent>
</Tooltip>
</DetailValue>
</Detail>
@@ -99,17 +104,20 @@ export const GroupDetailsSection = ({ groupId, handlePopUpOpen, canEditGroup = t
<DetailLabel>Slug</DetailLabel>
<DetailValue className="flex items-center gap-x-1">
{data.group.slug}
- <Tooltip content="Copy slug to clipboard">
- <IconButton
- onClick={() => {
- navigator.clipboard.writeText(data.group.slug);
- setCopyTextSlug("Copied");
- }}
- variant="ghost"
- size="xs"
- >
- {isCopyingSlug ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
- </IconButton>
+ <Tooltip hoverable delayDuration={50}>
+ <TooltipTrigger asChild>
+ <IconButton
+ onClick={() => {
+ navigator.clipboard.writeText(data.group.slug);
+ setCopyTextSlug("Copied");
+ }}
+ variant="ghost"
+ size="xs"
+ >
+ {isCopyingSlug ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
+ </IconButton>
+ </TooltipTrigger>
+ <TooltipContent>Copy slug to clipboard</TooltipContent>
</Tooltip>
</DetailValue>
</Detail>
diff --git a/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupMembersSection/GroupMembershipUserRow.tsx b/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupMembersSection/GroupMembershipUserRow.tsx
index 473cc6fcf9..3d57952e31 100644
--- a/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupMembersSection/GroupMembershipUserRow.tsx
+++ b/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupMembersSection/GroupMembershipUserRow.tsx
@@ -2,7 +2,6 @@ import { format } from "date-fns";
import { MoreHorizontalIcon, UserIcon } from "lucide-react";
import { OrgPermissionCan } from "@app/components/permissions";
-import { Tooltip } from "@app/components/v2";
import {
DropdownMenu,
DropdownMenuContent,
@@ -10,7 +9,10 @@ import {
DropdownMenuTrigger,
IconButton,
TableCell,
- TableRow
+ TableRow,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger
} from "@app/components/v3";
import { OrgPermissionGroupActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import { useOidcManageGroupMembershipsEnabled } from "@app/hooks/api";
@@ -69,25 +71,29 @@ export const GroupMembershipUserRow = ({
<OrgPermissionCan I={OrgPermissionGroupActions.Edit} a={OrgPermissionSubjects.Groups}>
{(isAllowed) => (
<Tooltip
- content={
- isOidcManageGroupMembershipsEnabled
- ? "OIDC Group Membership Mapping Enabled. Remove user from this group in your OIDC provider."
- : undefined
- }
- position="left"
+ hoverable
+ delayDuration={50}
+ open={isOidcManageGroupMembershipsEnabled ? undefined : false}
>
- <DropdownMenuItem
- variant="danger"
- onClick={() =>
- handlePopUpOpen("removeMemberFromGroup", {
- memberType: GroupMemberType.USER,
- username
- })
- }
- isDisabled={!isAllowed || isOidcManageGroupMembershipsEnabled}
- >
- Remove User From Group
- </DropdownMenuItem>
+ <TooltipTrigger asChild>
+ <DropdownMenuItem
+ variant="danger"
+ onClick={() =>
+ handlePopUpOpen("removeMemberFromGroup", {
+ memberType: GroupMemberType.USER,
+ username
+ })
+ }
+ isDisabled={!isAllowed || isOidcManageGroupMembershipsEnabled}
+ isDisabledFocusable={isOidcManageGroupMembershipsEnabled}
+ >
+ Remove User From Group
+ </DropdownMenuItem>
+ </TooltipTrigger>
+ <TooltipContent side="left">
+ OIDC Group Membership Mapping Enabled. Remove user from this group in your
+ OIDC provider.
+ </TooltipContent>
</Tooltip>
)}
</OrgPermissionCan>
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityClientSecrets.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityClientSecrets.tsx
deleted file mode 100644
index b7c8545579..0000000000
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityClientSecrets.tsx
+++ /dev/null
@@ -1,140 +0,0 @@
-import { faCheck, faCopy, faKey, faTrash } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { format } from "date-fns";
-
-import { OrgPermissionCan } from "@app/components/permissions";
-import { Button, IconButton, Tooltip } from "@app/components/v2";
-import { OrgPermissionIdentityActions, OrgPermissionSubjects } from "@app/context";
-import { useTimedReset } from "@app/hooks";
-import {
- useGetIdentityUniversalAuth,
- useGetIdentityUniversalAuthClientSecrets,
- useGetOrgIdentityMembershipById
-} from "@app/hooks/api";
-import { UsePopUpState } from "@app/hooks/usePopUp";
-
-type Props = {
- identityId: string;
- handlePopUpOpen: (
- popUpName: keyof UsePopUpState<
- ["clientSecret", "revokeClientSecret", "universalAuthClientSecret"]
- >,
- data?: object
- ) => void;
-};
-
-const SHOW_LIMIT = 3;
-
-export const IdentityClientSecrets = ({ identityId, handlePopUpOpen }: Props) => {
- const [copyTextClientId, isCopyingClientId, setCopyTextClientId] = useTimedReset<string>({
- initialState: "Copy Client ID to clipboard"
- });
-
- const { data } = useGetOrgIdentityMembershipById(identityId);
- const { data: identityUniversalAuth } = useGetIdentityUniversalAuth(identityId);
- const { data: clientSecrets } = useGetIdentityUniversalAuthClientSecrets(identityId);
- return (
- <div>
- <div className="mb-4">
- <p className="text-sm font-medium text-label">Client ID</p>
- <div className="group flex align-top">
- <p className="text-sm text-label">{identityUniversalAuth?.clientId ?? ""}</p>
- <div className="opacity-0 transition-opacity duration-300 group-hover:opacity-100">
- <Tooltip content={copyTextClientId}>
- <IconButton
- ariaLabel="copy icon"
- variant="plain"
- className="group relative ml-2"
- onClick={() => {
- navigator.clipboard.writeText(identityUniversalAuth?.clientId ?? "");
- setCopyTextClientId("Copied");
- }}
- >
- <FontAwesomeIcon icon={isCopyingClientId ? faCheck : faCopy} />
- </IconButton>
- </Tooltip>
- </div>
- </div>
- </div>
- {clientSecrets?.length ? (
- <div className="flex justify-between">
- <p className="text-sm font-medium text-label">{`Client Secrets (${clientSecrets.length})`}</p>
- <Button
- variant="link"
- onClick={() => {
- handlePopUpOpen("universalAuthClientSecret", {
- identityId,
- name: data?.identity.name ?? ""
- });
- }}
- >
- Manage
- </Button>
- </div>
- ) : (
- <div />
- )}
- {clientSecrets
- ?.slice(0, SHOW_LIMIT)
- .map(({ id, clientSecretTTL, clientSecretPrefix, createdAt }) => {
- let expiresAt;
- if (clientSecretTTL > 0) {
- expiresAt = new Date(new Date(createdAt).getTime() + clientSecretTTL * 1000);
- }
-
- return (
- <div
- className="group flex items-center justify-between py-2 last:pb-0"
- key={`client-secret-${id}`}
- >
- <div className="flex items-center">
- <FontAwesomeIcon size="1x" icon={faKey} />
- <div className="ml-4">
- <p className="text-sm font-medium text-label">{`${clientSecretPrefix}****`}</p>
- <p className="text-sm text-label">
- {expiresAt ? `Expires on ${format(expiresAt, "yyyy-MM-dd")}` : "No Expiry"}
- </p>
- </div>
- </div>
- <div className="opacity-0 transition-opacity duration-300 group-hover:opacity-100">
- <Tooltip content="Revoke Client Secret">
- <IconButton
- ariaLabel="copy icon"
- variant="plain"
- className="group relative"
- onClick={() => {
- handlePopUpOpen("revokeClientSecret", {
- clientSecretId: id,
- clientSecretPrefix
- });
- }}
- >
- <FontAwesomeIcon icon={faTrash} />
- </IconButton>
- </Tooltip>
- </div>
- </div>
- );
- })}
- <OrgPermissionCan I={OrgPermissionIdentityActions.Edit} a={OrgPermissionSubjects.Identity}>
- {(isAllowed) => {
- return (
- <Button
- isDisabled={!isAllowed}
- className="mt-4 w-full"
- colorSchema="primary"
- type="submit"
- onClick={() => {
- handlePopUpOpen("clientSecret", {
- identityId
- });
- }}
- >
- Create Client Secret
- </Button>
- );
- }}
- </OrgPermissionCan>
- </div>
- );
-};
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityTokens.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityTokens.tsx
deleted file mode 100644
index 1d3967c23e..0000000000
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityTokens.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import { faEllipsisVertical, faKey } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { format } from "date-fns";
-
-import {
- Button,
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuTrigger,
- IconButton,
- Tooltip
-} from "@app/components/v2";
-import { useGetIdentityTokensTokenAuth, useGetOrgIdentityMembershipById } from "@app/hooks/api";
-import { UsePopUpState } from "@app/hooks/usePopUp";
-
-type Props = {
- identityId: string;
- handlePopUpOpen: (
- popUpName: keyof UsePopUpState<["token", "tokenList", "revokeToken"]>,
- data?: object
- ) => void;
-};
-
-export const IdentityTokens = ({ identityId, handlePopUpOpen }: Props) => {
- const { data } = useGetOrgIdentityMembershipById(identityId);
- const { data: tokens } = useGetIdentityTokensTokenAuth(identityId);
- return (
- <div>
- {tokens?.length ? (
- <div className="flex items-center justify-between border-b border-border-secondary-strong pb-1">
- <p className="text-sm font-medium text-label-secondary">{`Access Tokens (${tokens.length})`}</p>
- <Button
- size="xs"
- className="underline"
- variant="plain"
- colorSchema="secondary"
- onClick={() => {
- handlePopUpOpen("tokenList", {
- identityId,
- name: data?.identity.name ?? ""
- });
- }}
- >
- Manage
- </Button>
- </div>
- ) : (
- <div />
- )}
- {tokens?.map((token) => {
- const expiresAt = new Date(
- new Date(token.createdAt).getTime() + token.accessTokenMaxTTL * 1000
- );
- return (
- <div
- className="group flex items-center justify-between border-b border-border-strong px-2 py-2 last:pb-0"
- key={`identity-token-${token.id}`}
- >
- <div className="flex items-center">
- <FontAwesomeIcon size="xs" className="text-muted" icon={faKey} />
- <div className="ml-3">
- <p className="text-sm font-medium text-label">{token.name ? token.name : "-"}</p>
- <p className="text-xs text-muted">
- {token.isAccessTokenRevoked
- ? "Revoked"
- : `Expires on ${format(expiresAt, "yyyy-MM-dd")}`}
- </p>
- </div>
- </div>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Tooltip side="right" content="More options">
- <IconButton
- colorSchema="secondary"
- variant="plain"
- size="xs"
- ariaLabel="More options"
- >
- <FontAwesomeIcon icon={faEllipsisVertical} />
- </IconButton>
- </Tooltip>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="start" className="z-101 p-1">
- <DropdownMenuItem
- onClick={async () => {
- handlePopUpOpen("token", {
- identityId,
- tokenId: token.id,
- name: token.name
- });
- }}
- >
- Edit Token
- </DropdownMenuItem>
- {!token.isAccessTokenRevoked && (
- <DropdownMenuItem
- onClick={async () => {
- handlePopUpOpen("revokeToken", {
- identityId,
- tokenId: token.id,
- name: token.name
- });
- }}
- >
- Revoke Token
- </DropdownMenuItem>
- )}
- </DropdownMenuContent>
- </DropdownMenu>
- </div>
- );
- })}
- <Button
- className="mt-4 mr-4 w-full"
- colorSchema="secondary"
- type="submit"
- size="xs"
- onClick={() => {
- handlePopUpOpen("token", {
- identityId
- });
- }}
- >
- Create Token
- </Button>
- </div>
- );
-};
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
index 3e011f974b..28a8fdbbbb 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
@@ -2,7 +2,6 @@ import { format } from "date-fns";
import { BanIcon, CheckIcon, ClipboardListIcon, PencilIcon } from "lucide-react";
import { OrgPermissionCan } from "@app/components/permissions";
-import { Tooltip } from "@app/components/v2";
import {
Badge,
ButtonGroup,
@@ -18,7 +17,10 @@ import {
DetailValue,
IconButton,
OrgIcon,
- SubOrgIcon
+ SubOrgIcon,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger
} from "@app/components/v3";
import { OrgPermissionIdentityActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import { useTimedReset } from "@app/hooks";
@@ -89,18 +91,21 @@ export const IdentityDetailsSection = ({
<DetailLabel>ID</DetailLabel>
<DetailValue className="flex items-center gap-x-1">
{data.identity.id}
- <Tooltip content="Copy machine identity ID to clipboard">
- <IconButton
- onClick={() => {
- navigator.clipboard.writeText(data.identity.id);
- setCopyTextId("Copied");
- }}
- variant="ghost"
- size="xs"
- >
- {/* TODO(scott): color this should be a button variant and create re-usable copy button */}
- {isCopyingId ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
- </IconButton>
+ <Tooltip hoverable delayDuration={50}>
+ <TooltipTrigger asChild>
+ <IconButton
+ onClick={() => {
+ navigator.clipboard.writeText(data.identity.id);
+ setCopyTextId("Copied");
+ }}
+ variant="ghost"
+ size="xs"
+ >
+ {/* TODO(scott): color this should be a button variant and create re-usable copy button */}
+ {isCopyingId ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
+ </IconButton>
+ </TooltipTrigger>
+ <TooltipContent>Copy machine identity ID to clipboard</TooltipContent>
</Tooltip>
</DetailValue>
</Detail>
diff --git a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolConnectedResourcesDrawer.tsx b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolConnectedResourcesDrawer.tsx
index 673d51a0e6..2ba7e499a5 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolConnectedResourcesDrawer.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolConnectedResourcesDrawer.tsx
@@ -1,7 +1,6 @@
import { Link } from "@tanstack/react-router";
import { ExternalLinkIcon } from "lucide-react";
-import { Spinner } from "@app/components/v2";
import {
Accordion,
AccordionContent,
@@ -12,7 +11,8 @@ import {
SheetContent,
SheetDescription,
SheetHeader,
- SheetTitle
+ SheetTitle,
+ Spinner
} from "@app/components/v3";
import { useOrganization } from "@app/context";
import {
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgProductSelectSection/OrgProductSelectSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgProductSelectSection/OrgProductSelectSection.tsx
deleted file mode 100644
index f12cd23db1..0000000000
--- a/frontend/src/pages/organization/SettingsPage/components/OrgProductSelectSection/OrgProductSelectSection.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import { useEffect, useState } from "react";
-
-import { Switch } from "@app/components/v2";
-import { useOrganization } from "@app/context";
-import { useUpdateOrg } from "@app/hooks/api";
-
-export const OrgProductSelectSection = () => {
- const [toggledProducts, setToggledProducts] = useState<{
- [key: string]: { name: string; enabled: boolean };
- }>({
- secretsProductEnabled: {
- name: "Secret Management",
- enabled: true
- },
- pkiProductEnabled: {
- name: "Certificate Manager",
- enabled: true
- },
- kmsProductEnabled: {
- name: "KMS",
- enabled: true
- },
- scannerProductEnabled: {
- name: "Scanner",
- enabled: true
- },
- shareSecretsProductEnabled: {
- name: "Share Secrets",
- enabled: true
- }
- });
-
- const [isLoading, setIsLoading] = useState(false);
-
- const { currentOrg } = useOrganization();
- const { mutateAsync } = useUpdateOrg();
-
- useEffect(() => {
- Object.entries(currentOrg).forEach(([key, value]) => {
- if (key in toggledProducts && typeof value === "boolean") {
- setToggledProducts((products) => ({
- ...products,
- [key]: { ...products[key], enabled: value }
- }));
- }
- });
- }, [currentOrg?.id]);
-
- const onProductToggle = async (value: boolean, key: string) => {
- setIsLoading(true);
-
- setToggledProducts((products) => ({
- ...products,
- [key]: { ...products[key], enabled: value }
- }));
-
- await mutateAsync({
- orgId: currentOrg.id,
- [key]: value
- });
-
- setIsLoading(false);
- };
-
- return (
- <div className="mb-6 rounded-lg border border-border-control bg-surface-base px-6 py-5">
- <h2 className="text-xl font-normal text-foreground">Enabled Products</h2>
- <p className="mb-4 text-muted-cool">
- Select which products are available for your organization.
- </p>
-
- <div className="grid grid-cols-2 gap-3">
- {Object.entries(toggledProducts).map(([key, product]) => (
- <Switch
- key={key}
- id={`enable-${key}`}
- isDisabled={isLoading}
- onCheckedChange={(value) => onProductToggle(value, key)}
- isChecked={product.enabled}
- className="ml-0"
- containerClassName="flex-row-reverse gap-3 w-fit"
- >
- {product.name}
- </Switch>
- ))}
- </div>
- </div>
- );
-};
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgProductSelectSection/index.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgProductSelectSection/index.tsx
deleted file mode 100644
index fb1bdbb29e..0000000000
--- a/frontend/src/pages/organization/SettingsPage/components/OrgProductSelectSection/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { OrgProductSelectSection } from "./OrgProductSelectSection";
diff --git a/frontend/src/pages/organization/UserDetailsByIDPage/components/UserDetailsSection.tsx b/frontend/src/pages/organization/UserDetailsByIDPage/components/UserDetailsSection.tsx
index 0d9e019ed1..fb157ea59b 100644
--- a/frontend/src/pages/organization/UserDetailsByIDPage/components/UserDetailsSection.tsx
+++ b/frontend/src/pages/organization/UserDetailsByIDPage/components/UserDetailsSection.tsx
@@ -11,7 +11,6 @@ import {
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
-import { Tooltip } from "@app/components/v2";
import {
Badge,
Button,
@@ -26,7 +25,10 @@ import {
DetailGroup,
DetailLabel,
DetailValue,
- IconButton
+ IconButton,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger
} from "@app/components/v3";
import {
OrgPermissionMemberActions,
@@ -140,17 +142,20 @@ export const UserDetailsSection = ({ membershipId, handlePopUpOpen }: Props) =>
<DetailLabel>ID</DetailLabel>
<DetailValue className="flex items-center gap-x-1">
{membership.user.id}
- <Tooltip content="Copy user ID to clipboard">
- <IconButton
- onClick={() => {
- navigator.clipboard.writeText(membership.user.id);
- setCopyTextId("Copied");
- }}
- variant="ghost"
- size="xs"
- >
- {isCopyingId ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
- </IconButton>
+ <Tooltip hoverable delayDuration={50}>
+ <TooltipTrigger asChild>
+ <IconButton
+ onClick={() => {
+ navigator.clipboard.writeText(membership.user.id);
+ setCopyTextId("Copied");
+ }}
+ variant="ghost"
+ size="xs"
+ >
+ {isCopyingId ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
+ </IconButton>
+ </TooltipTrigger>
+ <TooltipContent>Copy user ID to clipboard</TooltipContent>
</Tooltip>
</DetailValue>
</Detail>
@@ -160,34 +165,38 @@ export const UserDetailsSection = ({ membershipId, handlePopUpOpen }: Props) =>
{membership.user.email ? (
<>
{membership.user.email}
- <Tooltip
- content={
- membership.user.isEmailVerified
- ? "Email has been verified"
- : "Email has not been verified"
- }
- >
- {membership.user.isEmailVerified ? (
- <CheckIcon size={14} className="ml-0.5 shrink-0 text-success" />
- ) : (
- <XIcon size={14} className="ml-0.5 shrink-0 text-danger" />
- )}
- </Tooltip>
- <Tooltip content="Copy user email to clipboard">
- <IconButton
- onClick={() => {
- navigator.clipboard.writeText(membership.user.email!);
- setCopyEmail("Copied");
- }}
- variant="ghost"
- size="xs"
- >
- {isCopyingEmail ? (
- <CheckIcon />
+ <Tooltip hoverable delayDuration={50}>
+ <TooltipTrigger asChild>
+ {membership.user.isEmailVerified ? (
+ <CheckIcon size={14} className="ml-0.5 shrink-0 text-success" />
) : (
- <ClipboardListIcon className="text-label" />
+ <XIcon size={14} className="ml-0.5 shrink-0 text-danger" />
)}
- </IconButton>
+ </TooltipTrigger>
+ <TooltipContent>
+ {membership.user.isEmailVerified
+ ? "Email has been verified"
+ : "Email has not been verified"}
+ </TooltipContent>
+ </Tooltip>
+ <Tooltip hoverable delayDuration={50}>
+ <TooltipTrigger asChild>
+ <IconButton
+ onClick={() => {
+ navigator.clipboard.writeText(membership.user.email!);
+ setCopyEmail("Copied");
+ }}
+ variant="ghost"
+ size="xs"
+ >
+ {isCopyingEmail ? (
+ <CheckIcon />
+ ) : (
+ <ClipboardListIcon className="text-label" />
+ )}
+ </IconButton>
+ </TooltipTrigger>
+ <TooltipContent>Copy user email to clipboard</TooltipContent>
</Tooltip>
</>
) : (