diff --git a/frontend/src/components/v2/Button/Button.tsx b/frontend/src/components/v2/Button/Button.tsx index 635aa0858..c4a89023c 100644 --- a/frontend/src/components/v2/Button/Button.tsx +++ b/frontend/src/components/v2/Button/Button.tsx @@ -33,6 +33,7 @@ const buttonVariants = cva( solid: '', outline: ['bg-transparent', 'border-2', 'border-solid'], plain: '', + selected: '', // a constant color not in use on hover or click goes colorSchema color star: 'text-bunker-200 bg-mineshaft-500' }, @@ -61,6 +62,16 @@ const buttonVariants = cva( variant: 'star', className: 'hover:bg-primary hover:text-black' }, + { + colorSchema: 'primary', + variant: 'selected', + className: 'bg-primary/10 border border-primary/50 text-bunker-200' + }, + { + colorSchema: 'secondary', + variant: 'star', + className: 'bg-mineshaft-700 border border-mineshaft-600 hover:bg-mineshaft hover:text-white' + }, { colorSchema: 'danger', variant: 'star', diff --git a/frontend/src/views/DashboardPage/DashboardPage.tsx b/frontend/src/views/DashboardPage/DashboardPage.tsx index a77eadc14..146b42165 100644 --- a/frontend/src/views/DashboardPage/DashboardPage.tsx +++ b/frontend/src/views/DashboardPage/DashboardPage.tsx @@ -189,11 +189,9 @@ export const DashboardPage = () => { handleSubmit, getValues, setValue, - formState: { isDirty, isSubmitting, dirtyFields }, + formState: { isSubmitting, dirtyFields }, reset } = method; - console.log(122, method) - console.log(123, isDirty, Object.keys(dirtyFields)) const formSecrets = useWatch({ control, name: 'secrets' }); const { fields, prepend, append, remove, update } = useFieldArray({ control, name: 'secrets' }); @@ -201,7 +199,6 @@ export const DashboardPage = () => { const isReadOnly = selectedEnv?.isWriteDenied; const isAddOnly = selectedEnv?.isReadDenied && !selectedEnv?.isWriteDenied; const canDoRollback = !isReadOnly && !isAddOnly; - console.log(123, !isRollbackMode, !isAddOnly, !isDirty) const isSubmitDisabled = isReadOnly || // on add only mode the formstate becomes dirty due to secrets missing some items @@ -415,7 +412,7 @@ export const DashboardPage = () => { ); return ( -