mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 23:23:59 +00:00
feat: upgraded to tw v4
This commit is contained in:
+2
-2
@@ -269,7 +269,7 @@ const GroupRolesForm = ({ projectRoles, roles, groupId, onClose }: FormProps) =>
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit(handleRoleUpdate)} id="role-update-form">
|
||||
<div className="thin-scrollbar max-h-80 space-y-4 overflow-y-auto">
|
||||
<div className="max-h-80 thin-scrollbar space-y-4 overflow-y-auto">
|
||||
{projectRoles
|
||||
?.filter(
|
||||
({ name, slug }) =>
|
||||
@@ -281,7 +281,7 @@ const GroupRolesForm = ({ projectRoles, roles, groupId, onClose }: FormProps) =>
|
||||
|
||||
return (
|
||||
<div key={id} className="flex items-center space-x-4">
|
||||
<div className="flex-grow">
|
||||
<div className="grow">
|
||||
<Controller
|
||||
control={control}
|
||||
defaultValue={Boolean(userProjectRoleDetails?.id)}
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ export const GroupsSection = () => {
|
||||
return (
|
||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="mb-4 flex items-center justify-between">
|
||||
<p className="text-xl font-semibold text-mineshaft-100">User Groups</p>
|
||||
<p className="text-xl font-medium text-mineshaft-100">User Groups</p>
|
||||
<ProjectPermissionCan I={ProjectPermissionActions.Create} a={ProjectPermissionSub.Groups}>
|
||||
{(isAllowed) => (
|
||||
<Button
|
||||
|
||||
@@ -168,13 +168,13 @@ export const IdentityTab = withProjectPermission(
|
||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="mb-4 flex items-center justify-between">
|
||||
<div className="flex items-center gap-1">
|
||||
<p className="text-xl font-semibold text-mineshaft-100">Identities</p>
|
||||
<p className="text-xl font-medium text-mineshaft-100">Identities</p>
|
||||
<a
|
||||
href="https://infisical.com/docs/documentation/platform/identities/overview"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<div className="ml-1 mt-[0.16rem] inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
|
||||
<div className="mt-[0.16rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
|
||||
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
|
||||
<span>Docs</span>
|
||||
<FontAwesomeIcon
|
||||
|
||||
+5
-5
@@ -378,7 +378,7 @@ export const SpecificPrivilegeSecretForm = ({
|
||||
isChecked={field.value}
|
||||
onCheckedChange={(isChecked) => field.onChange(isChecked)}
|
||||
/>
|
||||
<div className="pointer-events-none ml-1 flex select-none flex-col text-mineshaft-300">
|
||||
<div className="pointer-events-none ml-1 flex flex-col text-mineshaft-300 select-none">
|
||||
<div className="flex flex-row items-center gap-1">
|
||||
<FontAwesomeIcon
|
||||
icon={faEye}
|
||||
@@ -409,7 +409,7 @@ export const SpecificPrivilegeSecretForm = ({
|
||||
isChecked={field.value}
|
||||
onCheckedChange={(isChecked) => field.onChange(isChecked)}
|
||||
/>
|
||||
<div className="pointer-events-none ml-1 flex select-none flex-col text-mineshaft-300">
|
||||
<div className="pointer-events-none ml-1 flex flex-col text-mineshaft-300 select-none">
|
||||
<div className="flex flex-row items-center gap-1">
|
||||
<FontAwesomeIcon
|
||||
icon={faPlus}
|
||||
@@ -442,7 +442,7 @@ export const SpecificPrivilegeSecretForm = ({
|
||||
isChecked={field.value}
|
||||
onCheckedChange={(isChecked) => field.onChange(isChecked)}
|
||||
/>
|
||||
<div className="pointer-events-none ml-1 flex select-none flex-col text-mineshaft-300">
|
||||
<div className="pointer-events-none ml-1 flex flex-col text-mineshaft-300 select-none">
|
||||
<div className="flex flex-row items-center gap-1">
|
||||
<FontAwesomeIcon
|
||||
icon={faPencil}
|
||||
@@ -473,7 +473,7 @@ export const SpecificPrivilegeSecretForm = ({
|
||||
isChecked={field.value}
|
||||
onCheckedChange={(isChecked) => field.onChange(isChecked)}
|
||||
/>
|
||||
<div className="pointer-events-none ml-1 flex select-none flex-col text-mineshaft-300">
|
||||
<div className="pointer-events-none ml-1 flex flex-col text-mineshaft-300 select-none">
|
||||
<div className="flex flex-row items-center gap-1">
|
||||
<FontAwesomeIcon
|
||||
icon={faTrashCan}
|
||||
@@ -504,7 +504,7 @@ export const SpecificPrivilegeSecretForm = ({
|
||||
rightIcon={<FontAwesomeIcon icon={faCaretDown} className="ml-4" />}
|
||||
isDisabled={isMemberEditDisabled}
|
||||
className={twMerge(
|
||||
"w-full border-mineshaft-600 bg-mineshaft-900 py-2.5 text-sm capitalize text-mineshaft-300 hover:border-mineshaft-600 hover:bg-mineshaft-800",
|
||||
"w-full border-mineshaft-600 bg-mineshaft-900 py-2.5 text-sm text-mineshaft-300 capitalize hover:border-mineshaft-600 hover:bg-mineshaft-800",
|
||||
isExpired && "text-red-600"
|
||||
)}
|
||||
>
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ export const MembersSection = () => {
|
||||
return (
|
||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="mb-4 flex items-center justify-between">
|
||||
<p className="text-xl font-semibold text-mineshaft-100">Users</p>
|
||||
<p className="text-xl font-medium text-mineshaft-100">Users</p>
|
||||
<ProjectPermissionCan I={ProjectPermissionActions.Create} a={ProjectPermissionSub.Member}>
|
||||
{(isAllowed) => (
|
||||
<Button
|
||||
|
||||
+2
-2
@@ -193,7 +193,7 @@ export const MembersTable = ({ handlePopUpOpen }: Props) => {
|
||||
variant="plain"
|
||||
size="sm"
|
||||
className={twMerge(
|
||||
"flex h-[2.375rem] w-[2.6rem] items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",
|
||||
"flex h-9.5 w-[2.6rem] items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",
|
||||
isTableFiltered && "border-primary/50 text-primary"
|
||||
)}
|
||||
>
|
||||
@@ -209,7 +209,7 @@ export const MembersTable = ({ handlePopUpOpen }: Props) => {
|
||||
>
|
||||
Roles
|
||||
</DropdownSubMenuTrigger>
|
||||
<DropdownSubMenuContent className="thin-scrollbar max-h-[20rem] overflow-y-auto rounded-l-none">
|
||||
<DropdownSubMenuContent className="max-h-80 thin-scrollbar overflow-y-auto rounded-l-none">
|
||||
<DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
|
||||
Apply Roles to Filter Users
|
||||
</DropdownMenuLabel>
|
||||
|
||||
+4
-4
@@ -167,7 +167,7 @@ export const ProjectRoleList = () => {
|
||||
return (
|
||||
<div className="rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="mb-4 flex justify-between">
|
||||
<p className="text-xl font-semibold text-mineshaft-100">Project Roles</p>
|
||||
<p className="text-xl font-medium text-mineshaft-100">Project Roles</p>
|
||||
<ProjectPermissionCan I={ProjectPermissionActions.Create} a={ProjectPermissionSub.Role}>
|
||||
{(isAllowed) => (
|
||||
<Button
|
||||
@@ -261,7 +261,7 @@ export const ProjectRoleList = () => {
|
||||
<Td>{name}</Td>
|
||||
<Td>{slug}</Td>
|
||||
<Td>
|
||||
<Badge className="w-min whitespace-nowrap bg-mineshaft-400/50 text-bunker-200">
|
||||
<Badge className="w-min bg-mineshaft-400/50 whitespace-nowrap text-bunker-200">
|
||||
{isCustomProjectRole(slug) ? "Custom" : "Default"}
|
||||
</Badge>
|
||||
</Td>
|
||||
@@ -278,7 +278,7 @@ export const ProjectRoleList = () => {
|
||||
<FontAwesomeIcon icon={faEllipsisV} />
|
||||
</IconButton>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="min-w-[12rem]" sideOffset={2} align="end">
|
||||
<DropdownMenuContent className="min-w-48" sideOffset={2} align="end">
|
||||
<ProjectPermissionCan
|
||||
I={ProjectPermissionActions.Edit}
|
||||
a={ProjectPermissionSub.Role}
|
||||
@@ -335,7 +335,7 @@ export const ProjectRoleList = () => {
|
||||
icon={<FontAwesomeIcon icon={faTrash} />}
|
||||
className={twMerge(
|
||||
isAllowed
|
||||
? "hover:!bg-red-500 hover:!text-white"
|
||||
? "hover:bg-red-500! hover:text-white!"
|
||||
: "pointer-events-none cursor-not-allowed opacity-50",
|
||||
"transition-colors duration-100"
|
||||
)}
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@ export const ServiceTokenTab = () => {
|
||||
{/* <div className="flex w-full flex-row items-center rounded-md border border-primary-600/70 bg-primary/[.07] p-4 text-base text-white">
|
||||
<FontAwesomeIcon icon={faWarning} className="pr-6 text-4xl text-white/80" />
|
||||
<div className="flex w-full flex-col text-sm">
|
||||
<span className="mb-4 text-lg font-semibold">Deprecation Notice</span>
|
||||
<span className="mb-4 text-lg font-medium">Deprecation Notice</span>
|
||||
<p>
|
||||
Service Tokens are being deprecated in favor of Machine Identities.
|
||||
<br />
|
||||
@@ -26,7 +26,7 @@ export const ServiceTokenTab = () => {
|
||||
<a
|
||||
href="https://infisical.com/blog/deprecating-api-keys"
|
||||
target="_blank"
|
||||
className="font-semibold text-primary-400" rel="noreferrer"
|
||||
className="font-medium text-primary-400" rel="noreferrer"
|
||||
>
|
||||
here
|
||||
</a>
|
||||
@@ -35,7 +35,7 @@ export const ServiceTokenTab = () => {
|
||||
<a
|
||||
href="https://infisical.com/docs/documentation/platform/identities/overview"
|
||||
target="_blank"
|
||||
className="font-semibold text-primary-400" rel="noreferrer"
|
||||
className="font-medium text-primary-400" rel="noreferrer"
|
||||
>
|
||||
Learn more about Machine Identities
|
||||
</a>
|
||||
|
||||
+3
-3
@@ -201,7 +201,7 @@ const ServiceTokenForm = () => {
|
||||
defaultValue="/"
|
||||
render={({ field, fieldState: { error } }) => (
|
||||
<FormControl
|
||||
className="mb-0 flex-grow"
|
||||
className="mb-0 grow"
|
||||
label={index === 0 ? "Secrets Path" : undefined}
|
||||
isError={Boolean(error)}
|
||||
errorText={error?.message}
|
||||
@@ -314,7 +314,7 @@ const ServiceTokenForm = () => {
|
||||
</div>
|
||||
</form>
|
||||
) : (
|
||||
<div className="mb-3 mr-2 mt-2 flex items-center justify-end rounded-md bg-white/[0.07] p-2 text-base text-gray-400">
|
||||
<div className="mt-2 mr-2 mb-3 flex items-center justify-end rounded-md bg-white/[0.07] p-2 text-base text-gray-400">
|
||||
<p className="mr-4 break-all">{newToken}</p>
|
||||
<IconButton
|
||||
ariaLabel="copy icon"
|
||||
@@ -323,7 +323,7 @@ const ServiceTokenForm = () => {
|
||||
onClick={copyTokenToClipboard}
|
||||
>
|
||||
<FontAwesomeIcon icon={isTokenCopied ? faCheck : faCopy} />
|
||||
<span className="absolute -left-8 -top-20 hidden w-28 translate-y-full rounded-md bg-bunker-800 py-2 pl-3 text-center text-sm text-gray-400 group-hover:flex group-hover:animate-fadeIn">
|
||||
<span className="group-hover:animate-fade-in absolute -top-20 -left-8 hidden w-28 translate-y-full rounded-md bg-bunker-800 py-2 pl-3 text-center text-sm text-gray-400 group-hover:flex">
|
||||
{t("common.click-to-copy")}
|
||||
</span>
|
||||
</IconButton>
|
||||
|
||||
+2
-2
@@ -51,13 +51,13 @@ export const ServiceTokenSection = withProjectPermission(
|
||||
<div className="mb-2 flex items-center justify-between">
|
||||
<div>
|
||||
<div className="flex items-center gap-1">
|
||||
<p className="text-xl font-semibold text-mineshaft-100">Service Tokens</p>
|
||||
<p className="text-xl font-medium text-mineshaft-100">Service Tokens</p>
|
||||
<a
|
||||
href="https://infisical.com/docs/documentation/platform/token"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<div className="ml-1 mt-[0.16rem] inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
|
||||
<div className="mt-[0.16rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
|
||||
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
|
||||
<span>Docs</span>
|
||||
<FontAwesomeIcon
|
||||
|
||||
+1
-1
@@ -236,7 +236,7 @@ export const ServiceTokenTable = ({ handlePopUpOpen }: Props) => {
|
||||
<FontAwesomeIcon icon={faEllipsisV} />
|
||||
</IconButton>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="min-w-[12rem]" sideOffset={2} align="end">
|
||||
<DropdownMenuContent className="min-w-48" sideOffset={2} align="end">
|
||||
<ProjectPermissionCan
|
||||
I={ProjectPermissionActions.Delete}
|
||||
a={ProjectPermissionSub.ServiceTokens}
|
||||
|
||||
@@ -72,7 +72,7 @@ export const GroupDetailsSection = ({ groupMembership }: Props) => {
|
||||
return (
|
||||
<div className="rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
|
||||
<h3 className="text-lg font-semibold text-mineshaft-100">Group Details</h3>
|
||||
<h3 className="text-lg font-medium text-mineshaft-100">Group Details</h3>
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<IconButton ariaLabel="Options" colorSchema="secondary" className="w-6" variant="plain">
|
||||
@@ -101,7 +101,7 @@ export const GroupDetailsSection = ({ groupMembership }: Props) => {
|
||||
</div>
|
||||
<div className="pt-4">
|
||||
<div className="mb-4">
|
||||
<p className="text-sm font-semibold text-mineshaft-300">Group ID</p>
|
||||
<p className="text-sm font-medium text-mineshaft-300">Group ID</p>
|
||||
<div className="group flex items-center gap-2">
|
||||
<p className="text-sm text-mineshaft-300">{groupMembership.group.id}</p>
|
||||
<CopyButton
|
||||
@@ -113,18 +113,18 @@ export const GroupDetailsSection = ({ groupMembership }: Props) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<p className="text-sm font-semibold text-mineshaft-300">Name</p>
|
||||
<p className="text-sm font-medium text-mineshaft-300">Name</p>
|
||||
<p className="text-sm text-mineshaft-300">{groupMembership.group.name}</p>
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<p className="text-sm font-semibold text-mineshaft-300">Slug</p>
|
||||
<p className="text-sm font-medium text-mineshaft-300">Slug</p>
|
||||
<div className="group flex items-center gap-2">
|
||||
<p className="text-sm text-mineshaft-300">{groupMembership.group.slug}</p>
|
||||
<CopyButton value={groupMembership.group.slug} name="Slug" size="xs" variant="plain" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<p className="text-sm font-semibold text-mineshaft-300">Project Role</p>
|
||||
<p className="text-sm font-medium text-mineshaft-300">Project Role</p>
|
||||
<ProjectPermissionCan I={ProjectPermissionActions.Edit} a={ProjectPermissionSub.Groups}>
|
||||
{(isAllowed) => (
|
||||
<GroupRoles
|
||||
@@ -138,7 +138,7 @@ export const GroupDetailsSection = ({ groupMembership }: Props) => {
|
||||
</ProjectPermissionCan>
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<p className="text-sm font-semibold text-mineshaft-300">Assigned to Project</p>
|
||||
<p className="text-sm font-medium text-mineshaft-300">Assigned to Project</p>
|
||||
<p className="text-sm text-mineshaft-300">
|
||||
{format(groupMembership.createdAt, "M/d/yyyy")}
|
||||
</p>
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ export const GroupMembersSection = ({ groupMembership }: Props) => {
|
||||
return (
|
||||
<div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
|
||||
<h3 className="text-lg font-semibold text-mineshaft-100">Group Members</h3>
|
||||
<h3 className="text-lg font-medium text-mineshaft-100">Group Members</h3>
|
||||
</div>
|
||||
<div className="py-4">
|
||||
<GroupMembersTable groupMembership={groupMembership} />
|
||||
|
||||
+2
-2
@@ -193,7 +193,7 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
|
||||
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">
|
||||
<Button
|
||||
leftIcon={<FontAwesomeIcon icon={faChevronLeft} />}
|
||||
className="text-lg font-semibold text-mineshaft-100"
|
||||
className="text-lg font-medium text-mineshaft-100"
|
||||
variant="link"
|
||||
onClick={onGoBack}
|
||||
>
|
||||
@@ -249,7 +249,7 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
|
||||
<div>
|
||||
<Popover>
|
||||
<PopoverTrigger disabled={isIdentityEditDisabled} asChild>
|
||||
<div className="w-full max-w-md flex-grow">
|
||||
<div className="w-full max-w-md grow">
|
||||
<FormLabel label="Duration" />
|
||||
<Tooltip content={toolTipText}>
|
||||
<Button
|
||||
|
||||
+2
-2
@@ -81,7 +81,7 @@ export const IdentityProjectAdditionalPrivilegeSection = ({ identityMembershipDe
|
||||
initial={{ opacity: 0, translateX: 30 }}
|
||||
animate={{ opacity: 1, translateX: 0 }}
|
||||
exit={{ opacity: 0, translateX: 30 }}
|
||||
className="absolute min-h-[10rem] w-full"
|
||||
className="absolute min-h-40 w-full"
|
||||
>
|
||||
<IdentityProjectAdditionalPrivilegeModifySection
|
||||
onGoBack={() => handlePopUpClose("modifyPrivilege")}
|
||||
@@ -105,7 +105,7 @@ export const IdentityProjectAdditionalPrivilegeSection = ({ identityMembershipDe
|
||||
className="absolute w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4"
|
||||
>
|
||||
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
|
||||
<h3 className="text-lg font-semibold text-mineshaft-100">
|
||||
<h3 className="text-lg font-medium text-mineshaft-100">
|
||||
Project Additional Privileges
|
||||
</h3>
|
||||
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ export const IdentityRoleDetailsSection = ({
|
||||
return (
|
||||
<div className="mb-4 w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
|
||||
<h3 className="text-lg font-semibold text-mineshaft-100">Project Roles</h3>
|
||||
<h3 className="text-lg font-medium text-mineshaft-100">Project Roles</h3>
|
||||
<ProjectPermissionCan
|
||||
I={ProjectPermissionActions.Edit}
|
||||
a={subject(ProjectPermissionSub.Identity, {
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ export const IdentityRoleModify = ({ identityProjectMembership }: Props) => {
|
||||
/>
|
||||
<Popover>
|
||||
<PopoverTrigger disabled={isIdentityEditDisabled} asChild>
|
||||
<div className="flex-grow">
|
||||
<div className="grow">
|
||||
<Tooltip
|
||||
content={
|
||||
temporaryAccess?.isTemporary
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ export const MemberProjectAdditionalPrivilegeSection = ({ membershipDetails }: P
|
||||
initial={{ opacity: 0, translateX: 30 }}
|
||||
animate={{ opacity: 1, translateX: 0 }}
|
||||
exit={{ opacity: 0, translateX: 30 }}
|
||||
className="absolute min-h-[10rem] w-full"
|
||||
className="absolute min-h-40 w-full"
|
||||
>
|
||||
<MembershipProjectAdditionalPrivilegeModifySection
|
||||
onGoBack={() => handlePopUpClose("modifyPrivilege")}
|
||||
@@ -105,7 +105,7 @@ export const MemberProjectAdditionalPrivilegeSection = ({ membershipDetails }: P
|
||||
className="absolute w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4"
|
||||
>
|
||||
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
|
||||
<h3 className="text-lg font-semibold text-mineshaft-100">
|
||||
<h3 className="text-lg font-medium text-mineshaft-100">
|
||||
Project Additional Privileges
|
||||
</h3>
|
||||
{userId !== membershipDetails?.user?.id &&
|
||||
|
||||
+2
-2
@@ -189,7 +189,7 @@ export const MembershipProjectAdditionalPrivilegeModifySection = ({
|
||||
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">
|
||||
<Button
|
||||
leftIcon={<FontAwesomeIcon icon={faChevronLeft} />}
|
||||
className="text-lg font-semibold text-mineshaft-100"
|
||||
className="text-lg font-medium text-mineshaft-100"
|
||||
variant="link"
|
||||
onClick={onGoBack}
|
||||
>
|
||||
@@ -245,7 +245,7 @@ export const MembershipProjectAdditionalPrivilegeModifySection = ({
|
||||
<div>
|
||||
<Popover>
|
||||
<PopoverTrigger disabled={isMemberEditDisabled} asChild>
|
||||
<div className="w-full max-w-md flex-grow">
|
||||
<div className="w-full max-w-md grow">
|
||||
<FormLabel label="Duration" />
|
||||
<Tooltip content={toolTipText}>
|
||||
<Button
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ export const MemberRoleDetailsSection = ({
|
||||
return (
|
||||
<div className="mb-4 w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
|
||||
<h3 className="text-lg font-semibold text-mineshaft-100">Project Roles</h3>
|
||||
<h3 className="text-lg font-medium text-mineshaft-100">Project Roles</h3>
|
||||
{!isOwnProjectMembershipDetails && membershipDetails?.status !== "invited" && (
|
||||
<ProjectPermissionCan
|
||||
I={ProjectPermissionActions.Edit}
|
||||
|
||||
+1
-1
@@ -181,7 +181,7 @@ export const MemberRoleModify = ({ projectMember, onOpenUpgradeModal }: Props) =
|
||||
/>
|
||||
<Popover>
|
||||
<PopoverTrigger disabled={isMemberEditDisabled} asChild>
|
||||
<div className="flex-grow">
|
||||
<div className="grow">
|
||||
<Tooltip
|
||||
content={
|
||||
temporaryAccess?.isTemporary
|
||||
|
||||
@@ -94,7 +94,7 @@ const Page = () => {
|
||||
<div className="flex flex-col">
|
||||
<div>
|
||||
<span>{data.name}</span>
|
||||
<p className="text-sm font-[400] normal-case leading-3 text-mineshaft-400">
|
||||
<p className="text-sm leading-3 font-normal text-mineshaft-400 normal-case">
|
||||
{data.slug} {data.description && `- ${data.description}`}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -144,7 +144,7 @@ export const ConditionsFields = ({
|
||||
<FormControl
|
||||
isError={Boolean(error?.message)}
|
||||
errorText={error?.message}
|
||||
className="mb-0 flex-grow"
|
||||
className="mb-0 grow"
|
||||
>
|
||||
<Select
|
||||
position="popper"
|
||||
@@ -170,7 +170,7 @@ export const ConditionsFields = ({
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-grow">
|
||||
<div className="grow">
|
||||
<Controller
|
||||
control={control}
|
||||
name={`permissions.${subject}.${position}.conditions.${index}.rhs` as const}
|
||||
@@ -178,7 +178,7 @@ export const ConditionsFields = ({
|
||||
<FormControl
|
||||
isError={Boolean(error?.message)}
|
||||
errorText={error?.message}
|
||||
className="mb-0 flex-grow"
|
||||
className="mb-0 grow"
|
||||
>
|
||||
<Input {...field} />
|
||||
</FormControl>
|
||||
|
||||
+4
-4
@@ -138,7 +138,7 @@ export const GeneralPermissionPolicies = <T extends keyof NonNullable<TFormSchem
|
||||
>
|
||||
<FontAwesomeIcon className="mr-6 w-4" icon={isOpen ? faChevronDown : faChevronRight} />
|
||||
|
||||
<div className="flex-grow select-none text-base">{title}</div>
|
||||
<div className="grow text-base select-none">{title}</div>
|
||||
{fields.length > 1 && (
|
||||
<div>
|
||||
<Tag size="xs" className="mr-2 px-2">
|
||||
@@ -247,7 +247,7 @@ export const GeneralPermissionPolicies = <T extends keyof NonNullable<TFormSchem
|
||||
colorSchema="danger"
|
||||
variant="plain"
|
||||
size="xs"
|
||||
className="ml-auto mr-3 rounded"
|
||||
className="mr-3 ml-auto rounded-sm"
|
||||
onClick={() => remove(rootIndex)}
|
||||
isDisabled={isDisabled}
|
||||
>
|
||||
@@ -280,7 +280,7 @@ export const GeneralPermissionPolicies = <T extends keyof NonNullable<TFormSchem
|
||||
colorSchema="danger"
|
||||
variant="plain"
|
||||
size="xs"
|
||||
className="ml-auto rounded"
|
||||
className="ml-auto rounded-sm"
|
||||
onClick={() => remove(rootIndex)}
|
||||
isDisabled={isDisabled}
|
||||
>
|
||||
@@ -289,7 +289,7 @@ export const GeneralPermissionPolicies = <T extends keyof NonNullable<TFormSchem
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-grow flex-wrap justify-start gap-x-8 gap-y-4">
|
||||
<div className="flex grow flex-wrap justify-start gap-x-8 gap-y-4">
|
||||
{actions.map(({ label, value }, index) => {
|
||||
if (typeof value !== "string") return undefined;
|
||||
|
||||
|
||||
+3
-3
@@ -119,8 +119,8 @@ const Content = ({ onClose, type: projectType }: ContentProps) => {
|
||||
) : null
|
||||
}
|
||||
/>
|
||||
<TableContainer className="thin-scrollbar mt-4 max-h-[28rem]">
|
||||
<div className="sticky top-0 z-30 flex justify-between border-b border-b-mineshaft-600 bg-mineshaft-800 py-3 pl-5 pr-4 font-inter text-sm font-medium text-bunker-300">
|
||||
<TableContainer className="mt-4 max-h-112 thin-scrollbar">
|
||||
<div className="sticky top-0 z-30 flex justify-between border-b border-b-mineshaft-600 bg-mineshaft-800 py-3 pr-4 pl-5 font-inter text-sm font-medium text-bunker-300">
|
||||
<span>Resource</span>
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
@@ -182,7 +182,7 @@ const Content = ({ onClose, type: projectType }: ContentProps) => {
|
||||
<EmptyState
|
||||
iconSize="2x"
|
||||
icon={faSearch}
|
||||
className="!pb-4 !pt-8"
|
||||
className="pt-8! pb-4!"
|
||||
title="No policies match search"
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -137,14 +137,14 @@ const Content = ({ onClose, type: projectType }: ContentProps) => {
|
||||
value={id}
|
||||
className="m-0 border border-mineshaft-600 first:rounded-t last:rounded-b data-[state=open]:border-primary/40 data-[state=open]:bg-mineshaft-600/30"
|
||||
>
|
||||
<AccordionTrigger className="w-full justify-start p-4 py-8 text-mineshaft-100 hover:bg-mineshaft-700 hover:text-mineshaft-100 data-[state=open]:bg-primary/[3%] data-[state=open]:text-mineshaft-100">
|
||||
<AccordionTrigger className="w-full justify-start p-4 py-8 text-mineshaft-100 hover:bg-mineshaft-700 hover:text-mineshaft-100 data-[state=open]:bg-primary/3 data-[state=open]:text-mineshaft-100">
|
||||
<div className="mr-auto flex flex-col py-2 text-left">
|
||||
<span>{name}</span>
|
||||
<span className="text-sm leading-3 text-mineshaft-400">{description}</span>
|
||||
</div>
|
||||
</AccordionTrigger>
|
||||
<AccordionContent className="border-t border-mineshaft-600">
|
||||
<div className="thin-scrollbar max-h-[20rem] overflow-y-auto">
|
||||
<div className="max-h-80 thin-scrollbar overflow-y-auto">
|
||||
<span className="text-mineshaft-300">Grants the following permissions:</span>
|
||||
<div className="grid grid-cols-2 gap-4 py-2">
|
||||
{permissions
|
||||
|
||||
+2
-2
@@ -1298,8 +1298,8 @@ export const PROJECT_PERMISSION_OBJECT: TProjectPermissionObject = {
|
||||
This is a legacy action and will be removed in the future.
|
||||
<br />
|
||||
<br /> You should instead use the{" "}
|
||||
<strong className="font-semibold">Describe Secret</strong> and{" "}
|
||||
<strong className="font-semibold">Read Value</strong> actions.
|
||||
<strong className="font-medium">Describe Secret</strong> and{" "}
|
||||
<strong className="font-medium">Read Value</strong> actions.
|
||||
</div>
|
||||
}
|
||||
>
|
||||
|
||||
+2
-2
@@ -164,7 +164,7 @@ export const RolePermissionsSection = ({ roleSlug, isDisabled }: Props) => {
|
||||
<FormProvider {...form}>
|
||||
<div className="mx-4 flex items-center justify-between border-b border-mineshaft-400 pb-4">
|
||||
<div>
|
||||
<h3 className="text-lg font-semibold text-mineshaft-100">Policies</h3>
|
||||
<h3 className="text-lg font-medium text-mineshaft-100">Policies</h3>
|
||||
<p className="text-sm leading-3 text-mineshaft-400">
|
||||
Configure granular access policies
|
||||
</p>
|
||||
@@ -198,7 +198,7 @@ export const RolePermissionsSection = ({ roleSlug, isDisabled }: Props) => {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-1 flex-col overflow-hidden pl-4 pr-1">
|
||||
<div className="flex flex-1 flex-col overflow-hidden pr-1 pl-4">
|
||||
<div className="thin-scrollbar flex-1 overflow-y-scroll py-4">
|
||||
{!isPending && <PermissionEmptyState />}
|
||||
{(Object.keys(PROJECT_PERMISSION_OBJECT) as ProjectPermissionSub[])
|
||||
|
||||
+2
-2
@@ -87,9 +87,9 @@ export const AuditLogsRetentionSection = () => {
|
||||
<>
|
||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<div className="flex w-full items-center justify-between">
|
||||
<p className="text-xl font-semibold">Audit Logs Retention</p>
|
||||
<p className="text-xl font-medium">Audit Logs Retention</p>
|
||||
</div>
|
||||
<p className="mb-4 mt-2 max-w-2xl text-sm text-gray-400">
|
||||
<p className="mt-2 mb-4 max-w-2xl text-sm text-gray-400">
|
||||
Set the number of days to keep your project audit logs.
|
||||
</p>
|
||||
<form onSubmit={handleSubmit(handleAuditLogsRetentionSubmit)} autoComplete="off">
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ export const DeleteProjectProtection = () => {
|
||||
|
||||
return (
|
||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<p className="mb-3 text-xl font-semibold">Delete Protection</p>
|
||||
<p className="mb-3 text-xl font-medium">Delete Protection</p>
|
||||
<ProjectPermissionCan I={ProjectPermissionActions.Edit} a={ProjectPermissionSub.Settings}>
|
||||
{(isAllowed) => (
|
||||
<div className="w-max">
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
return (
|
||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||
<p className="mb-4 text-xl font-semibold text-mineshaft-100">Danger Zone</p>
|
||||
<p className="mb-4 text-xl font-medium text-mineshaft-100">Danger Zone</p>
|
||||
<div className="space-x-4">
|
||||
<ProjectPermissionCan I={ProjectPermissionActions.Delete} a={ProjectPermissionSub.Project}>
|
||||
{(isAllowed) => (
|
||||
|
||||
Reference in New Issue
Block a user