diff --git a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx index 0ed9cd9a4..294544093 100644 --- a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx +++ b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx @@ -1,9 +1,22 @@ -import { faKey, faLock, faPencil, faServer, faXmark } from "@fortawesome/free-solid-svg-icons"; +import { + faCopy, + faEllipsis, + faKey, + faLock, + faPencil, + faServer, + faXmark +} from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { twMerge } from "tailwind-merge"; import { createNotification } from "@app/components/notifications"; import { OrgPermissionCan } from "@app/components/permissions"; import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, EmptyState, IconButton, Select, @@ -80,7 +93,6 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => { Name - ID Role Auth Method @@ -95,7 +107,6 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => { return ( {name} - {id} { {authMethod ? identityAuthToNameMap[authMethod] : "Not configured"} -
+
{authMethod === IdentityAuthMethod.UNIVERSAL_AUTH && ( { colorSchema="primary" variant="plain" ariaLabel="update" - // isDisabled={!isAllowed} > @@ -165,7 +175,6 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => { colorSchema="primary" variant="plain" ariaLabel="update" - className="ml-4" isDisabled={!isAllowed} > @@ -173,54 +182,78 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => { )} - - {(isAllowed) => ( - { - handlePopUpOpen("identity", { - identityId: id, - name, - role, - customRole - }); - }} - size="lg" - colorSchema="primary" - variant="plain" - ariaLabel="update" - className="ml-4" - isDisabled={!isAllowed} + + +
+ + + +
+
+ + - -
- )} -
- - {(isAllowed) => ( - ( + { + if (!isAllowed) return; + handlePopUpOpen("identity", { + identityId: id, + name, + role, + customRole + }); + }} + disabled={!isAllowed} + icon={} + > + Update identity + + )} + + + {(isAllowed) => ( + { + if (!isAllowed) return; + handlePopUpOpen("deleteIdentity", { + identityId: id, + name + }); + }} + icon={} + > + Delete identity + + )} + + { - handlePopUpOpen("deleteIdentity", { - identityId: id, - name + navigator.clipboard.writeText(id); + createNotification({ + text: "Copied identity internal ID to clipboard", + type: "success" }); }} - size="lg" - colorSchema="danger" - variant="plain" - ariaLabel="update" - className="ml-4" - isDisabled={!isAllowed} + icon={} > - - - )} - + Copy Identity ID + + +