From aa6578d1760d1dfd180c66d44bc49dba84dd2224 Mon Sep 17 00:00:00 2001 From: stevepodell Date: Fri, 14 Feb 2025 17:06:38 -0800 Subject: [PATCH] Sign in via email/password with email verification roughly working. Apis are not yet protected from access without cookie/sessionID Didn't want to get too diverged from other development. Put most Routes in App behind the ProtectRoute -- If that causes problems in testing, you can disable it by taking Routes out of ProtectedRoutes. Cleared some lint warnings and console errors in PersonSummaryHeader and PersonSummaryRow -- the boolean variables do get through to the StyledComponent and change the styles. Added a sign in/out buttonm to the HeaderBar. Added VerifySecretCodeModal with styling same as in the WebApp. Commented out more code we won't be using to make searching easier. Cleared more lint warnings. --- package-lock.json | 6 +- src/App.jsx | 19 +- src/js/auth.js | 34 -- src/js/common/dispatcher/Dispatcher.js | 36 -- src/js/common/utils/apiCalming.js | 78 ++-- .../components/Drawers/EditQuestionDrawer.jsx | 2 +- .../Drawers/EditTaskGroupDrawer.jsx | 2 +- src/js/components/Navigation/HeaderBar.jsx | 118 +++--- .../Person/EditPersonDrawerMainContent.jsx | 1 + .../components/Person/PersonSummaryHeader.jsx | 20 +- src/js/components/Person/PersonSummaryRow.jsx | 37 +- src/js/components/PrivateRoute.jsx | 28 +- src/js/components/VerifySecretCodeModal.jsx | 362 ++++++++++++++++++ src/js/contexts/ConnectAppContext.jsx | 14 +- src/js/pages/Login.jsx | 117 ++++-- src/js/pages/Teams.jsx | 26 +- src/js/react-query/WeConnectQuery.js | 10 +- src/js/react-query/mutations.jsx | 22 +- src/js/test/ReactQuerySaveReadTest.jsx | 110 ++++++ 19 files changed, 754 insertions(+), 288 deletions(-) delete mode 100644 src/js/auth.js delete mode 100644 src/js/common/dispatcher/Dispatcher.js create mode 100644 src/js/components/VerifySecretCodeModal.jsx create mode 100644 src/js/test/ReactQuerySaveReadTest.jsx diff --git a/package-lock.json b/package-lock.json index 11a8da5..f41d9df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19756,9 +19756,9 @@ } }, "node_modules/undici": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz", - "integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==", + "version": "6.21.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", + "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", "dev": true, "license": "MIT", "engines": { diff --git a/src/App.jsx b/src/App.jsx index 9458772..e8e3f1a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -72,18 +72,19 @@ function App () { } /> + } /> }> } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> } /> {/*