diff --git a/src/consts.ts b/src/consts.ts index 3284acaf..78143cdf 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -80,6 +80,7 @@ export const slotNavWidth = slotNavWithoutListWidth + slotsListWidth + slotsNavSpacing; export const narrowNavMedia = "(max-width: 768px)"; +export const identityIconOnlyWidth = "473px"; export const maxZIndex = 110; diff --git a/src/features/Header/IdentityKey.tsx b/src/features/Header/IdentityKey.tsx index de0fb1ad..44174ca3 100644 --- a/src/features/Header/IdentityKey.tsx +++ b/src/features/Header/IdentityKey.tsx @@ -12,13 +12,13 @@ import { useMedia } from "react-use"; import clsx from "clsx"; import { useIdentityPeer } from "../../hooks/useIdentityPeer"; import PopoverDropdown from "../../components/PopoverDropdown"; -import { maxZIndex } from "../../consts"; +import { identityIconOnlyWidth, maxZIndex } from "../../consts"; import { useUptimeDuration } from "../../hooks/useUptime"; export default function IdentityKey() { const { peer, identityKey } = useIdentityPeer(); - const isXXNarrowScreen = useMedia("(min-width: 473px)"); + const isXXNarrowScreen = useMedia(`(min-width: ${identityIconOnlyWidth})`); const isXNarrowScreen = useMedia("(min-width: 620px)"); const isNarrowScreen = useMedia("(min-width: 1100px)"); diff --git a/src/features/Header/Nav.tsx b/src/features/Header/Nav.tsx index aab608e9..62e5373a 100644 --- a/src/features/Header/Nav.tsx +++ b/src/features/Header/Nav.tsx @@ -1,7 +1,7 @@ import { DropdownMenu } from "radix-ui"; import styles from "./nav.module.css"; import type { ButtonProps } from "@radix-ui/themes"; -import { Button, Flex } from "@radix-ui/themes"; +import { Button, Flex, Text } from "@radix-ui/themes"; import SsidChartIcon from "@material-design-icons/svg/filled/ssid_chart.svg?react"; import AssessmentIcon from "@material-design-icons/svg/filled/assessment.svg?react"; import CalendarMonthIcon from "@material-design-icons/svg/filled/calendar_month.svg?react"; @@ -57,7 +57,7 @@ const NavButton = forwardRef( return ( <> - {label} + {label} {showDropdownIcon && ( {!isStartup && ( - + {showDropdownNav ? : } )} - + {isStartup ? ( @@ -145,9 +153,8 @@ function Attribution() { - - Attribution: The IP address data in src/disco/gui/ipinfo.bin is - powered by IPinfo Inc.{" "} + + Attribution: The IP address data is powered by IPinfo Inc.{" "} https://ipinfo.io/ diff --git a/src/features/Header/nav.module.css b/src/features/Header/nav.module.css index b4e58f7a..4fed6318 100644 --- a/src/features/Header/nav.module.css +++ b/src/features/Header/nav.module.css @@ -8,6 +8,9 @@ gap: 5px; padding: 0 15px; + flex-shrink: 1; + min-width: 50px; + .icon { height: 14px; width: 14px;