improvement: add priv conflict info and improve back button

This commit is contained in:
Scott Wilson
2024-10-25 00:59:41 +05:30
committed by =
parent 4e6ebcc8d9
commit 833398ef39
2 changed files with 26 additions and 18 deletions
@@ -19,7 +19,6 @@ import {
Button, Button,
FormControl, FormControl,
FormLabel, FormLabel,
IconButton,
Input, Input,
Modal, Modal,
ModalContent, ModalContent,
@@ -202,12 +201,14 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
> >
<FormProvider {...form}> <FormProvider {...form}>
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-2"> <div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">
<div className="flex space-x-2"> <Button
<IconButton ariaLabel="go-back" variant="plain" onClick={onGoBack}> leftIcon={<FontAwesomeIcon icon={faChevronLeft} />}
<FontAwesomeIcon icon={faChevronLeft} /> className="text-lg font-semibold text-mineshaft-100"
</IconButton> variant="link"
<h3 className="text-lg font-semibold text-mineshaft-100">Back</h3> onClick={onGoBack}
</div> >
Back
</Button>
<div className="flex items-center space-x-4"> <div className="flex items-center space-x-4">
{isDirty && ( {isDirty && (
<Button <Button
@@ -252,8 +253,11 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
</div> </div>
</div> </div>
</div> </div>
<div className="mt-2 border-b border-gray-800 p-4 first:rounded-t-md last:rounded-b-md"> <div className="mt-2 border-b border-gray-800 p-4 pt-2 first:rounded-t-md last:rounded-b-md">
<div className="mb-2 text-lg">Overview</div> <div className="text-lg">Overview</div>
<p className="mb-4 text-sm text-mineshaft-300">
Additional privileges take precedence over roles when permissions conflict
</p>
<div className=" flex items-end space-x-6"> <div className=" flex items-end space-x-6">
<div className="w-full max-w-md"> <div className="w-full max-w-md">
<Controller <Controller
@@ -19,7 +19,6 @@ import {
Button, Button,
FormControl, FormControl,
FormLabel, FormLabel,
IconButton,
Input, Input,
Modal, Modal,
ModalContent, ModalContent,
@@ -200,12 +199,14 @@ export const MembershipProjectAdditionalPrivilegeModifySection = ({
> >
<FormProvider {...form}> <FormProvider {...form}>
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-2"> <div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">
<div className="flex space-x-2"> <Button
<IconButton ariaLabel="go-back" variant="plain" onClick={onGoBack}> leftIcon={<FontAwesomeIcon icon={faChevronLeft} />}
<FontAwesomeIcon icon={faChevronLeft} /> className="text-lg font-semibold text-mineshaft-100"
</IconButton> variant="link"
<h3 className="text-lg font-semibold text-mineshaft-100">Back</h3> onClick={onGoBack}
</div> >
Back
</Button>
<div className="flex items-center space-x-4"> <div className="flex items-center space-x-4">
{isDirty && ( {isDirty && (
<Button <Button
@@ -250,8 +251,11 @@ export const MembershipProjectAdditionalPrivilegeModifySection = ({
</div> </div>
</div> </div>
</div> </div>
<div className="mt-2 border-b border-gray-800 p-4 first:rounded-t-md last:rounded-b-md"> <div className="mt-2 border-b border-gray-800 p-4 pt-2 first:rounded-t-md last:rounded-b-md">
<div className="mb-2 text-lg">Overview</div> <div className="text-lg">Overview</div>
<p className="mb-4 text-sm text-mineshaft-300">
Additional privileges take precedence over roles when permissions conflict
</p>
<div className=" flex items-end space-x-6"> <div className=" flex items-end space-x-6">
<div className="w-full max-w-md"> <div className="w-full max-w-md">
<Controller <Controller