diff --git a/ui/src/common/ConnectionErrorBanner.tsx b/ui/src/common/ConnectionErrorBanner.tsx index 067a7eab1..3083c0d76 100644 --- a/ui/src/common/ConnectionErrorBanner.tsx +++ b/ui/src/common/ConnectionErrorBanner.tsx @@ -12,12 +12,17 @@ export const ConnectionErrorBanner = ({height, retry, message}: ConnectionErrorB
- + {message}{' '} - ) : null} - - - ); -}); + const mobileAction = (action: VoidFunction) => { + action(); + setNavOpen(false); + }; + + return ( + +
+
+
+ setNavOpen(false)}> + + + + + + {loggedIn && ( +
+ setNavOpen(false)}> + + + + + + + + setNavOpen(false)}> + + + + + + + + setNavOpen(false)}> + + + + + + + + {admin && ( + setNavOpen(false)}> + + + + + + + + )} + + mobileAction(showSettings)}> + + + + + + mobileAction(logout)}> + + + + + + +
+ )} + {loggedIn ? userApps : placeholderItems} +
+ + + {showRequestNotification ? ( + + ) : null} + +
+ + ); + } +); const ResponsiveDrawer: React.FC< - DrawerProps & {navOpen: boolean; setNavOpen: (open: boolean) => void} -> = ({navOpen, setNavOpen, children, ...rest}) => ( + DrawerProps & { + navOpen: boolean; + setNavOpen: (open: boolean) => void; + bannerVisible: boolean; + } +> = ({navOpen, setNavOpen, bannerVisible, children, ...rest}) => ( <> setNavOpen(false)} {...rest}> - setNavOpen(false)} size="large"> - - {children} - + {children} diff --git a/ui/tsconfig.json b/ui/tsconfig.json index 8f946afe6..54f12de5a 100644 --- a/ui/tsconfig.json +++ b/ui/tsconfig.json @@ -36,6 +36,7 @@ "src/setupTests.ts" ], "include": [ - "src" + "src", + "vite-env.d.ts" ] }