diff --git a/packages/manager/.changeset/pr-10152-upcoming-features-1707246537679.md b/packages/manager/.changeset/pr-10152-upcoming-features-1707246537679.md new file mode 100644 index 00000000000..884f698a2f8 --- /dev/null +++ b/packages/manager/.changeset/pr-10152-upcoming-features-1707246537679.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Upcoming Features +--- + +Add session expiry confirmation dialog for proxy to parent user account switching ([#10152](https://github.com/linode/manager/pull/10152)) diff --git a/packages/manager/src/MainContent.tsx b/packages/manager/src/MainContent.tsx index 5d11ba2b26d..0d762133050 100644 --- a/packages/manager/src/MainContent.tsx +++ b/packages/manager/src/MainContent.tsx @@ -29,6 +29,7 @@ import { isFeatureEnabled } from 'src/utilities/accountCapabilities'; import { ENABLE_MAINTENANCE_MODE } from './constants'; import { complianceUpdateContext } from './context/complianceUpdateContext'; +import { switchAccountSessionContext } from './context/switchAccountSessionContext'; import { FlagSet } from './featureFlags'; import { useIsACLBEnabled } from './features/LoadBalancers/utils'; import { useGlobalErrors } from './hooks/useGlobalErrors'; @@ -192,6 +193,11 @@ export const MainContent = () => { const ComplianceUpdateProvider = complianceUpdateContext.Provider; const complianceUpdateContextValue = useDialogContext(); + const SwitchAccountSessionProvider = switchAccountSessionContext.Provider; + const switchAccountSessionContextValue = useDialogContext({ + isOpen: false, + }); + const [menuIsOpen, toggleMenu] = React.useState(false); const { _isManagedAccount, @@ -294,100 +300,105 @@ export const MainContent = () => { */ return (
- - - <> - {shouldDisplayMainContentBanner ? ( - setBannerDismissed(true)} - url={flags.mainContentBanner?.link?.url ?? ''} - /> - ) : null} - toggleMenu(false)} - collapse={desktopMenuIsOpen || false} - open={menuIsOpen} - /> -
- toggleMenu(true)} - username={username} + + + + <> + {shouldDisplayMainContentBanner ? ( + setBannerDismissed(true)} + url={flags.mainContentBanner?.link?.url ?? ''} + /> + ) : null} + toggleMenu(false)} + collapse={desktopMenuIsOpen || false} + open={menuIsOpen} /> -
- - - - }> - - - - - - {isACLBEnabled && ( + toggleMenu(true)} + username={username} + /> +
+ + + + }> + + + + + + {isACLBEnabled && ( + + )} + + + + + + - )} - - - - - - - - - - - - - - - {showDatabases && ( - - )} - {flags.selfServeBetas && ( - - )} - {showVPCs && } - - {/** We don't want to break any bookmarks. This can probably be removed eventually. */} - - - - + + + + + + + + {showDatabases && ( + + )} + {flags.selfServeBetas && ( + + )} + {showVPCs && } + + {/** We don't want to break any bookmarks. This can probably be removed eventually. */} + + + + + - -
-
- -
-
- + +
+ + +