diff --git a/spiffworkflow-frontend/src/components/ActiveUsers.tsx b/spiffworkflow-frontend/src/components/ActiveUsers.tsx index 012f9f675..7bd282b04 100644 --- a/spiffworkflow-frontend/src/components/ActiveUsers.tsx +++ b/spiffworkflow-frontend/src/components/ActiveUsers.tsx @@ -42,7 +42,7 @@ export default function ActiveUsers() { return (
{activeUser.username.charAt(0).toUpperCase()}
diff --git a/spiffworkflow-frontend/src/components/NavigationBar.tsx b/spiffworkflow-frontend/src/components/NavigationBar.tsx index b1ed09a4c..94e86961f 100644 --- a/spiffworkflow-frontend/src/components/NavigationBar.tsx +++ b/spiffworkflow-frontend/src/components/NavigationBar.tsx @@ -1,6 +1,12 @@ import { + Popover, + PopoverContent, + Button, + RadioButtonGroup, + RadioButton, Header, HeaderContainer, + HeaderMenu, HeaderMenuButton, SkipToContent, SideNav, @@ -14,7 +20,7 @@ import { // @ts-ignore } from '@carbon/react'; // @ts-ignore -import { Logout, Login } from '@carbon/icons-react'; +import { Settings, Logout, Login } from '@carbon/icons-react'; import { useEffect, useState } from 'react'; import { useLocation } from 'react-router-dom'; import { Can } from '@casl/react'; @@ -77,6 +83,40 @@ export default function NavigationBar() { return activeKey === menuItemPath; }; + const [openTwo, setOpenTwo] = useState(false); + + const popover = ( +
+ + + +

{UserService.getPreferredUsername()}

+

{UserService.getUserEmail()}

+
+ +
+
+
+ ); + const loginAndLogoutAction = () => { if (UserService.isLoggedIn()) { return ( @@ -86,16 +126,7 @@ export default function NavigationBar() { {SPIFF_ENVIRONMENT} ) : null} - - {UserService.getPreferredUsername()} - - - - + {popover} ); } diff --git a/spiffworkflow-frontend/src/index.css b/spiffworkflow-frontend/src/index.css index 9595fa7d1..30c4f4bbb 100644 --- a/spiffworkflow-frontend/src/index.css +++ b/spiffworkflow-frontend/src/index.css @@ -114,6 +114,23 @@ h2 { padding-left: 0; } +.cds--btn--ghost.button-link-for-popover { + color: #f4f4f4; + padding-left: 0; +} +.cds--btn--ghost.button-link-for-popover:visited { + color: #f4f4f4; + padding-left: 0; +} +.cds--btn--ghost.button-link-for-popover:hover { + color: #f4f4f4; + padding-left: 0; +} +.cds--btn--ghost.button-link-for-popover:visited:hover { + color: #f4f4f4; + padding-left: 0; +} + .cds--header__global .cds--btn--primary { background-color: #161616 } @@ -200,6 +217,22 @@ h1.with-icons { margin-bottom: 1em; } +#profile-user-button { + margin-right: 8px; +} + +.hot-button:hover { + background-color: #161616; +} + +#profile-user-button .cds--popover--tab-tip__button::after { + content: none; +} + +#profile-user-button .cds--popover--tab-tip.cds--popover--open .cds--popover--tab-tip__button{ + background-color: #161616; +} + .with-top-margin { margin-top: 1em; } @@ -471,49 +504,12 @@ svg.notification-icon { border-radius: 50%; color: #fff; font-weight: bold; +} + +.user-circle-for-list { margin-right: 10px; } -.user-circle.color-1 { - background-color: #8e8e8e; -} - -.user-circle.color-2 { - background-color: #a57c63; -} - -.user-circle.color-3 { - background-color: #8f7c7c; -} - -.user-circle.color-4 { - background-color: #9a927f; -} - -.user-circle.color-5 { - background-color: #5e5d5d; -} - -.user-circle.color-6 { - background-color: #676767; -} - -.user-circle.color-7 { - background-color: #6d7d6d; -} - -.user-circle.color-8 { - background-color: #7a7171; -} - -.user-circle.color-9 { - background-color: #837d63; -} - -.user-circle.color-10 { - background-color: #686a70; -} - /* Randomize color assignment */ .user-circle:nth-child(1) { background-color: #8e8e8e;