-
{
- setIsDrawerOpen(true);
- }}
- size="large"
- >
-
-
+
+
+ {logo_url ? (
+
+ ) : (
+
+ )}
+
-
setIsDrawerOpen(false)}
+
+
+
-
+
+
+
);
};
-const styles = {
- desktopNavItems: (theme) => css`
- display: none;
-
- ${theme.breakpoints.up("md")} {
- display: flex;
- }
- `,
- mobileMenuButton: (theme) => css`
- ${theme.breakpoints.up("md")} {
- display: none;
- }
- `,
- navMenus: (theme) => ({
- display: "flex",
- gap: 16,
- alignItems: "center",
- paddingRight: 16,
-
- [theme.breakpoints.up("md")]: {
- marginLeft: "auto",
- },
- }),
- wrapper: (theme) => css`
- position: relative;
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- ${theme.breakpoints.up("md")} {
- justify-content: flex-start;
- }
- `,
- drawerHeader: {
- padding: 16,
- paddingTop: 32,
- paddingBottom: 32,
- },
- logo: (theme) => css`
- align-items: center;
- display: flex;
- height: ${navHeight}px;
- color: ${theme.palette.text.primary};
- padding: 16px;
-
- // svg is for the Coder logo, img is for custom images
- & svg,
- & img {
- height: 100%;
- object-fit: contain;
- }
- `,
- drawerLogo: {
- padding: 0,
- maxHeight: 40,
- },
- link: (theme) => css`
- align-items: center;
- color: ${theme.palette.text.secondary};
- display: flex;
- flex: 1;
- font-size: 16px;
- padding: 12px 16px;
- text-decoration: none;
- transition: background-color 0.15s ease-in-out;
-
- &.active {
- color: ${theme.palette.text.primary};
- font-weight: 500;
- }
+interface NavItemsProps {
+ className?: string;
+}
- &:hover {
- background-color: ${theme.experimental.l2.hover.background};
- }
+const NavItems: FC
= ({ className }) => {
+ const location = useLocation();
- ${theme.breakpoints.up("md")} {
- height: ${navHeight}px;
- padding: 0 24px;
- }
- `,
-} satisfies Record>;
+ return (
+
+ );
+};
diff --git a/site/src/modules/dashboard/Navbar/ProxyMenu.tsx b/site/src/modules/dashboard/Navbar/ProxyMenu.tsx
index 2d14ce3daee56..5345d3db9cdae 100644
--- a/site/src/modules/dashboard/Navbar/ProxyMenu.tsx
+++ b/site/src/modules/dashboard/Navbar/ProxyMenu.tsx
@@ -1,6 +1,4 @@
import { useTheme } from "@emotion/react";
-import KeyboardArrowDownOutlined from "@mui/icons-material/KeyboardArrowDownOutlined";
-import Button from "@mui/material/Button";
import Divider from "@mui/material/Divider";
import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
@@ -8,13 +6,15 @@ import Skeleton from "@mui/material/Skeleton";
import { visuallyHidden } from "@mui/utils";
import type * as TypesGen from "api/typesGenerated";
import { Abbr } from "components/Abbr/Abbr";
+import { Button } from "components/Button/Button";
import { displayError } from "components/GlobalSnackbar/utils";
import { Latency } from "components/Latency/Latency";
import type { ProxyContextValue } from "contexts/ProxyContext";
import { useAuthenticated } from "contexts/auth/RequireAuth";
+import { ChevronDownIcon } from "lucide-react";
import { type FC, useRef, useState } from "react";
import { useNavigate } from "react-router-dom";
-import { BUTTON_SM_HEIGHT } from "theme/constants";
+import { sortProxiesByLatency } from "./proxyUtils";
interface ProxyMenuProps {
proxyContextValue: ProxyContextValue;
@@ -62,7 +62,7 @@ export const ProxyMenu: FC = ({ proxyContextValue }) => {
return (
);
@@ -71,13 +71,10 @@ export const ProxyMenu: FC = ({ proxyContextValue }) => {
return (
<>
- ))}
+ ),
+ )}