diff --git a/apps/dashboard/app/(app)/settings/root-keys/[keyId]/permissions/permission-manager-card.tsx b/apps/dashboard/app/(app)/settings/root-keys/[keyId]/permissions/permission-manager-card.tsx index 458ac06116..c746a64f46 100644 --- a/apps/dashboard/app/(app)/settings/root-keys/[keyId]/permissions/permission-manager-card.tsx +++ b/apps/dashboard/app/(app)/settings/root-keys/[keyId]/permissions/permission-manager-card.tsx @@ -1,4 +1,3 @@ -import { CopyButton } from "@/components/dashboard/copy-button"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { @@ -10,7 +9,6 @@ import { DialogTrigger, } from "@/components/ui/dialog"; import { Label } from "@/components/ui/label"; -import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import type { Permission } from "@unkey/db"; import { Check } from "lucide-react"; import { PermissionToggle } from "./permission_toggle"; @@ -103,20 +101,12 @@ export function PermissionManagerCard(props: PermissionManagerCardProps) { .filter(([_action, { description: _description, permission }]) => { return props.permissions.some((p) => p.name === permission); }) - .map(([action, { description, permission }]) => { + .map(([action, { description }]) => { return (
-
- - - - - - - {permission} - - - +
+ +

{description}

diff --git a/apps/dashboard/app/(app)/settings/root-keys/new/client.tsx b/apps/dashboard/app/(app)/settings/root-keys/new/client.tsx index a4cf818566..3fe8c58a45 100644 --- a/apps/dashboard/app/(app)/settings/root-keys/new/client.tsx +++ b/apps/dashboard/app/(app)/settings/root-keys/new/client.tsx @@ -20,7 +20,6 @@ import { import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { toast } from "@/components/ui/toaster"; -import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { trpc } from "@/lib/trpc/client"; import { type UnkeyPermission, unkeyPermissionValidation } from "@unkey/rbac"; import { ChevronRight } from "lucide-react"; @@ -152,7 +151,6 @@ export const Client: React.FC = ({ apis }) => {
{category}} description={`Select all permissions for ${category} in this workspace`} checked={isAllSelected} @@ -168,7 +166,6 @@ export const Client: React.FC = ({ apis }) => { {Object.entries(allPermissions).map(([action, { description, permission }]) => ( = ({ apis }) => {
{category} } @@ -243,7 +239,6 @@ export const Client: React.FC = ({ apis }) => { {Object.entries(roles).map(([action, { description, permission }]) => ( = ({ apis }) => { type PermissionToggleProps = { checked: boolean; setChecked: (checked: boolean) => void; - permissionName: string; label: string | React.ReactNode; description: string; }; @@ -333,31 +327,19 @@ type PermissionToggleProps = { const PermissionToggle: React.FC = ({ checked, setChecked, - permissionName, label, description, }) => { return (
-
- - -
- { - setChecked(!checked); - }} - /> - - -
-
- - {permissionName} - - -
+
+ { + setChecked(!checked); + }} + /> +

{description}