From 62229f0bcbba24b94a93a1d4ab35c586e6544b32 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos <125309814+jaalah-akamai@users.noreply.github.com> Date: Wed, 13 Mar 2024 19:14:09 -0400 Subject: [PATCH] upcoming: [M3-7866] - Improve Proxy Account Visibility with Distinct Visual Indicators (#10277) Co-authored-by: Jaalah Ramos --- ...r-10277-upcoming-features-1710340806902.md | 5 ++ .../manager/src/assets/icons/parent-child.svg | 1 + .../src/components/GravatarForProxy.tsx | 47 ++++++++++++ .../DisplaySettings/DisplaySettings.tsx | 75 +++++++++++-------- .../features/TopMenu/UserMenu/UserMenu.tsx | 9 ++- 5 files changed, 103 insertions(+), 34 deletions(-) create mode 100644 packages/manager/.changeset/pr-10277-upcoming-features-1710340806902.md create mode 100644 packages/manager/src/assets/icons/parent-child.svg create mode 100644 packages/manager/src/components/GravatarForProxy.tsx diff --git a/packages/manager/.changeset/pr-10277-upcoming-features-1710340806902.md b/packages/manager/.changeset/pr-10277-upcoming-features-1710340806902.md new file mode 100644 index 00000000000..cfd85b7cacd --- /dev/null +++ b/packages/manager/.changeset/pr-10277-upcoming-features-1710340806902.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Upcoming Features +--- + +Improve Proxy Account Visibility with Distinct Visual Indicators ([#10277](https://github.com/linode/manager/pull/10277)) diff --git a/packages/manager/src/assets/icons/parent-child.svg b/packages/manager/src/assets/icons/parent-child.svg new file mode 100644 index 00000000000..4edbab05ed4 --- /dev/null +++ b/packages/manager/src/assets/icons/parent-child.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/manager/src/components/GravatarForProxy.tsx b/packages/manager/src/components/GravatarForProxy.tsx new file mode 100644 index 00000000000..5bbef1d15b1 --- /dev/null +++ b/packages/manager/src/components/GravatarForProxy.tsx @@ -0,0 +1,47 @@ +import { styled } from '@mui/material/styles'; +import * as React from 'react'; + +import ProxyUserIcon from 'src/assets/icons/parent-child.svg'; +import { Box } from 'src/components/Box'; + +interface Props { + height?: number; + width?: number; +} + +export const GravatarForProxy = ({ height = 34, width = 34 }: Props) => { + return ( + ({ + background: `linear-gradient(60deg, ${theme.color.blue}, ${theme.color.teal} )`, + backgroundSize: '300% 300%', + borderRadius: '50%', + height, + padding: '3px', + width, + })} + > + ({ + background: theme.color.white, + borderRadius: '50%', + color: theme.palette.text.primary, + height: `calc(${height}px - 6px)`, + overflow: 'hidden', + position: 'relative', + width: `calc(${width}px - 6px)`, + })} + > + + + + ); +}; + +const StyledProxyUserIcon = styled(ProxyUserIcon, { + label: 'styledProxyUserIcon', +})(() => ({ + bottom: 0, + left: 0, + position: 'absolute', +})); diff --git a/packages/manager/src/features/Profile/DisplaySettings/DisplaySettings.tsx b/packages/manager/src/features/Profile/DisplaySettings/DisplaySettings.tsx index d86f9f66760..bff3afe0926 100644 --- a/packages/manager/src/features/Profile/DisplaySettings/DisplaySettings.tsx +++ b/packages/manager/src/features/Profile/DisplaySettings/DisplaySettings.tsx @@ -13,12 +13,12 @@ import { Paper } from 'src/components/Paper'; import { SingleTextFieldForm } from 'src/components/SingleTextFieldForm/SingleTextFieldForm'; import { TooltipIcon } from 'src/components/TooltipIcon'; import { Typography } from 'src/components/Typography'; +import { RESTRICTED_FIELD_TOOLTIP } from 'src/features/Account/constants'; import { useNotificationsQuery } from 'src/queries/accountNotifications'; import { useMutateProfile, useProfile } from 'src/queries/profile'; import { ApplicationState } from 'src/store'; import { TimezoneForm } from './TimezoneForm'; -import { RESTRICTED_FIELD_TOOLTIP } from 'src/features/Account/constants'; export const DisplaySettings = () => { const theme = useTheme(); @@ -68,39 +68,48 @@ export const DisplaySettings = () => { return ( - - -
- - Profile photo - + + - - - Create, upload, and manage your globally recognized avatar from a - single place with Gravatar. - - - Manage photo - -
-
- +
+ + Profile photo + + + + Create, upload, and manage your globally recognized avatar from + a single place with Gravatar. + + + Manage photo + +
+ + + + )} +