From 88507506f3eb8cac18bf1857e7799d78977663a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A9o=20Banno-Cloutier?=
 <leo.banno-cloutier@savoirfairelinux.com>
Date: Mon, 12 Jun 2023 10:58:48 -0400
Subject: [PATCH] blueprints: swap button colors in dialog

The cancel button was blue, while the submit button was white, making it
intuitively wrong, as I saw other people naturally pressing the blue
button by accident

Change-Id: Ic14bd3abf26915f217fe9686ff80933a4a31bb87
---
 .../components/buttonStyle.js                        |  2 +-
 jams-react-client/src/components/Navbars/Navbar.js   |  2 +-
 jams-react-client/src/views/Blueprints/Blueprints.js | 12 ++++++------
 jams-react-client/src/views/Groups/Groups.js         |  6 +++---
 jams-react-client/src/views/Settings/General.js      |  2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/jams-react-client/src/assets/jss/material-dashboard-react/components/buttonStyle.js b/jams-react-client/src/assets/jss/material-dashboard-react/components/buttonStyle.js
index 634bcc35..2737b636 100644
--- a/jams-react-client/src/assets/jss/material-dashboard-react/components/buttonStyle.js
+++ b/jams-react-client/src/assets/jss/material-dashboard-react/components/buttonStyle.js
@@ -44,7 +44,7 @@ const buttonStyle = {
     touchAction: "manipulation",
     cursor: "pointer",
     "&:hover,&:focus": {
-      color: blackColor,
+      color: "inherit",
       backgroundColor: grayColor[0],
       boxShadow:
         "0 14px 26px -12px rgba(" +
diff --git a/jams-react-client/src/components/Navbars/Navbar.js b/jams-react-client/src/components/Navbars/Navbar.js
index 7e66562c..f9689a9e 100755
--- a/jams-react-client/src/components/Navbars/Navbar.js
+++ b/jams-react-client/src/components/Navbars/Navbar.js
@@ -34,7 +34,7 @@ export default function Header(props) {
         </div>
         <Hidden mdUp implementation="css">
           <IconButton
-            color="info"
+            color="default"
             aria-label="open drawer"
             onClick={props.handleDrawerToggle}
           >
diff --git a/jams-react-client/src/views/Blueprints/Blueprints.js b/jams-react-client/src/views/Blueprints/Blueprints.js
index b2b2834b..4cbc643b 100644
--- a/jams-react-client/src/views/Blueprints/Blueprints.js
+++ b/jams-react-client/src/views/Blueprints/Blueprints.js
@@ -103,8 +103,8 @@ export default function Blueprints() {
 
   const [disableCreate, setDisableCreate] = React.useState(true);
 
-  const [removedBlueprint, setRemovedBlueprint] = React.useState();
-  const [openRemoveDialog, setOpenRemoveDialog] = React.useState();
+  const [removedBlueprint, setRemovedBlueprint] = React.useState("");
+  const [openRemoveDialog, setOpenRemoveDialog] = React.useState(false);
 
   useEffect(() => {
     setLoading(true);
@@ -254,7 +254,7 @@ export default function Blueprints() {
           <DialogContentText id="alert-dialog-description">
             <FormControl
               className={classes.margin}
-              size="large"
+              size="medium"
               error={blueprintNameExits}
             >
               <InputLabel htmlFor="blueprintName">
@@ -295,14 +295,14 @@ export default function Blueprints() {
         <DialogActions>
           <Button
             onClick={handleClose}
-            color="info"
-            className={classes.whiteButtonText}
+            color="primary"
           >
             {i18next.t("cancel", "Cancel")}
           </Button>
           <Button
             onClick={handleCreateBlueprint}
-            color="primary"
+            color="info"
+            className={classes.whiteButtonText}
             disabled={disableCreate}
             autoFocus
           >
diff --git a/jams-react-client/src/views/Groups/Groups.js b/jams-react-client/src/views/Groups/Groups.js
index 472fd01c..3c7fc79f 100644
--- a/jams-react-client/src/views/Groups/Groups.js
+++ b/jams-react-client/src/views/Groups/Groups.js
@@ -399,14 +399,14 @@ export default function Groups() {
           <DialogActions>
             <Button
               onClick={handleCloseCreate}
-              color="info"
-              className={classes.whiteButtonText}
+              color="primary"
             >
               Cancel
             </Button>
             <Button
               onClick={handleCreateGroup}
-              color="primary"
+              color="info"
+              className={classes.whiteButtonText}
               disabled={disableCreate}
               autoFocus
             >
diff --git a/jams-react-client/src/views/Settings/General.js b/jams-react-client/src/views/Settings/General.js
index 4e4bfcfc..4239499d 100644
--- a/jams-react-client/src/views/Settings/General.js
+++ b/jams-react-client/src/views/Settings/General.js
@@ -108,7 +108,7 @@ export default function General(props) {
     password: Yup.string().required(
       i18next.t("password_is_required", "Password is required!")
     ),
-    passwordConfirmation: Yup.string().oneOf(
+    confirmPassword: Yup.string().oneOf(
       [Yup.ref("password"), null],
       i18next.t("password_must_match", "Passwords must match")
     ),
-- 
GitLab