From da89550cee4b6b46b005a3f9652b3d6e6a43c5c7 Mon Sep 17 00:00:00 2001 From: Nikola Ubavic <53820106+ubavic@users.noreply.github.com> Date: Tue, 21 Dec 2021 16:54:17 +0100 Subject: [PATCH 1/3] fix: action buttons --- .../pages/UserManagement/UserManagement.js | 45 ++++++++++--------- .../UserManagement/UserManagement.styles.js | 8 ++-- .../src/styling/icons/button/key/white.svg | 11 +++++ .../src/styling/icons/button/key/zodiac.svg | 11 +++++ .../src/styling/icons/button/lock/white.svg | 11 +++++ .../src/styling/icons/button/lock/zodiac.svg | 11 +++++ .../styling/icons/button/user-role/white.svg | 10 +++++ .../styling/icons/button/user-role/zodiac.svg | 10 +++++ 8 files changed, 92 insertions(+), 25 deletions(-) create mode 100644 new-lamassu-admin/src/styling/icons/button/key/white.svg create mode 100644 new-lamassu-admin/src/styling/icons/button/key/zodiac.svg create mode 100644 new-lamassu-admin/src/styling/icons/button/lock/white.svg create mode 100644 new-lamassu-admin/src/styling/icons/button/lock/zodiac.svg create mode 100644 new-lamassu-admin/src/styling/icons/button/user-role/white.svg create mode 100644 new-lamassu-admin/src/styling/icons/button/user-role/zodiac.svg diff --git a/new-lamassu-admin/src/pages/UserManagement/UserManagement.js b/new-lamassu-admin/src/pages/UserManagement/UserManagement.js index a79f3270..126dd285 100644 --- a/new-lamassu-admin/src/pages/UserManagement/UserManagement.js +++ b/new-lamassu-admin/src/pages/UserManagement/UserManagement.js @@ -6,10 +6,13 @@ import * as R from 'ramda' import React, { useReducer, useState, useContext } from 'react' import AppContext from 'src/AppContext' -import { Link } from 'src/components/buttons' +import { ActionButton, Link } from 'src/components/buttons' import { Switch } from 'src/components/inputs' import TitleSection from 'src/components/layout/TitleSection' import DataTable from 'src/components/tables/DataTable' +import { ReactComponent as KeyIcon } from 'src/styling/icons/button/key/zodiac.svg' +import { ReactComponent as LockIcon } from 'src/styling/icons/button/lock/zodiac.svg' +import { ReactComponent as UserRoleIcon } from 'src/styling/icons/button/user-role/zodiac.svg' import styles from './UserManagement.styles' import ChangeRoleModal from './modals/ChangeRoleModal' @@ -153,35 +156,34 @@ const Users = () => { size: 'sm', view: u => { return ( - <> - + { setUserInfo(u) dispatch({ type: 'open', payload: 'showResetPasswordModal' }) - }} - /> - + Reset password + + { setUserInfo(u) dispatch({ type: 'open', payload: 'showReset2FAModal' }) - }} - /> - + Reset 2FA + + { setUserInfo(u) generateAttestationOptions({ @@ -189,9 +191,10 @@ const Users = () => { userID: u.id } }) - }} - /> - + }}> + Add FIDO + + ) } }, diff --git a/new-lamassu-admin/src/pages/UserManagement/UserManagement.styles.js b/new-lamassu-admin/src/pages/UserManagement/UserManagement.styles.js index 9366e555..6859dd97 100644 --- a/new-lamassu-admin/src/pages/UserManagement/UserManagement.styles.js +++ b/new-lamassu-admin/src/pages/UserManagement/UserManagement.styles.js @@ -52,10 +52,6 @@ const styles = { fontFamily: fontPrimary, marginLeft: 10 }, - actionChip: { - backgroundColor: subheaderColor, - marginRight: 15 - }, info: { fontFamily: fontSecondary, textAlign: 'justify' @@ -118,6 +114,10 @@ const styles = { }, roleSwitch: { marginLeft: 15 + }, + actionButtonWrapper: { + display: 'flex', + gap: 12 } } diff --git a/new-lamassu-admin/src/styling/icons/button/key/white.svg b/new-lamassu-admin/src/styling/icons/button/key/white.svg new file mode 100644 index 00000000..ec28f490 --- /dev/null +++ b/new-lamassu-admin/src/styling/icons/button/key/white.svg @@ -0,0 +1,11 @@ + + + icon/button/key/white + + + + + + + + \ No newline at end of file diff --git a/new-lamassu-admin/src/styling/icons/button/key/zodiac.svg b/new-lamassu-admin/src/styling/icons/button/key/zodiac.svg new file mode 100644 index 00000000..cd9d1645 --- /dev/null +++ b/new-lamassu-admin/src/styling/icons/button/key/zodiac.svg @@ -0,0 +1,11 @@ + + + icon/button/key/zodiac + + + + + + + + \ No newline at end of file diff --git a/new-lamassu-admin/src/styling/icons/button/lock/white.svg b/new-lamassu-admin/src/styling/icons/button/lock/white.svg new file mode 100644 index 00000000..53b5e362 --- /dev/null +++ b/new-lamassu-admin/src/styling/icons/button/lock/white.svg @@ -0,0 +1,11 @@ + + + icon/button/lock/white + + + + + + + + \ No newline at end of file diff --git a/new-lamassu-admin/src/styling/icons/button/lock/zodiac.svg b/new-lamassu-admin/src/styling/icons/button/lock/zodiac.svg new file mode 100644 index 00000000..fd064efc --- /dev/null +++ b/new-lamassu-admin/src/styling/icons/button/lock/zodiac.svg @@ -0,0 +1,11 @@ + + + icon/button/lock/zodiac + + + + + + + + \ No newline at end of file diff --git a/new-lamassu-admin/src/styling/icons/button/user-role/white.svg b/new-lamassu-admin/src/styling/icons/button/user-role/white.svg new file mode 100644 index 00000000..13e5a9a5 --- /dev/null +++ b/new-lamassu-admin/src/styling/icons/button/user-role/white.svg @@ -0,0 +1,10 @@ + + + icon/button/user-role/white + + + + + + + \ No newline at end of file diff --git a/new-lamassu-admin/src/styling/icons/button/user-role/zodiac.svg b/new-lamassu-admin/src/styling/icons/button/user-role/zodiac.svg new file mode 100644 index 00000000..5a05f3a5 --- /dev/null +++ b/new-lamassu-admin/src/styling/icons/button/user-role/zodiac.svg @@ -0,0 +1,10 @@ + + + icon/button/user-role/zodiac + + + + + + + \ No newline at end of file From b441a0a33edf0d76caa649734bcf5244998f92f2 Mon Sep 17 00:00:00 2001 From: Nikola Ubavic <53820106+ubavic@users.noreply.github.com> Date: Tue, 21 Dec 2021 17:09:50 +0100 Subject: [PATCH 2/3] fix: align column --- .../src/pages/SessionManagement/SessionManagement.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/new-lamassu-admin/src/pages/SessionManagement/SessionManagement.js b/new-lamassu-admin/src/pages/SessionManagement/SessionManagement.js index d40c5e0a..13d1fe0c 100644 --- a/new-lamassu-admin/src/pages/SessionManagement/SessionManagement.js +++ b/new-lamassu-admin/src/pages/SessionManagement/SessionManagement.js @@ -61,7 +61,7 @@ const SessionManagement = () => { { header: 'Last known use', width: 305, - textAlign: 'center', + textAlign: 'left', size: 'sm', view: s => { if (R.isNil(s.sess.ua)) return 'No Record' @@ -72,7 +72,7 @@ const SessionManagement = () => { { header: 'Last known location', width: 250, - textAlign: 'center', + textAlign: 'left', size: 'sm', view: s => { return isLocalhost(s.sess.ipAddress) ? 'This device' : s.sess.ipAddress From c44e07525a3ca517387704614d827db93e23c7ad Mon Sep 17 00:00:00 2001 From: Nikola Ubavic <53820106+ubavic@users.noreply.github.com> Date: Tue, 21 Dec 2021 17:25:16 +0100 Subject: [PATCH 3/3] fix: add inverse icons --- .../src/pages/UserManagement/UserManagement.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/new-lamassu-admin/src/pages/UserManagement/UserManagement.js b/new-lamassu-admin/src/pages/UserManagement/UserManagement.js index 126dd285..8b069d3a 100644 --- a/new-lamassu-admin/src/pages/UserManagement/UserManagement.js +++ b/new-lamassu-admin/src/pages/UserManagement/UserManagement.js @@ -10,8 +10,11 @@ import { ActionButton, Link } from 'src/components/buttons' import { Switch } from 'src/components/inputs' import TitleSection from 'src/components/layout/TitleSection' import DataTable from 'src/components/tables/DataTable' +import { ReactComponent as WhiteKeyIcon } from 'src/styling/icons/button/key/white.svg' import { ReactComponent as KeyIcon } from 'src/styling/icons/button/key/zodiac.svg' +import { ReactComponent as WhiteLockIcon } from 'src/styling/icons/button/lock/white.svg' import { ReactComponent as LockIcon } from 'src/styling/icons/button/lock/zodiac.svg' +import { ReactComponent as WhiteUserRoleIcon } from 'src/styling/icons/button/user-role/white.svg' import { ReactComponent as UserRoleIcon } from 'src/styling/icons/button/user-role/zodiac.svg' import styles from './UserManagement.styles' @@ -159,6 +162,7 @@ const Users = () => {
{ setUserInfo(u) @@ -171,6 +175,7 @@ const Users = () => { { setUserInfo(u) @@ -183,6 +188,7 @@ const Users = () => { { setUserInfo(u)