diff --git a/apps/cyberstorm-remix/cyberstorm/navigation/DesktopLoginPopover.tsx b/apps/cyberstorm-remix/cyberstorm/navigation/DesktopLoginPopover.tsx
index 872dda94f..08114539f 100644
--- a/apps/cyberstorm-remix/cyberstorm/navigation/DesktopLoginPopover.tsx
+++ b/apps/cyberstorm-remix/cyberstorm/navigation/DesktopLoginPopover.tsx
@@ -1,3 +1,19 @@
+import styles from "./Navigation.module.css";
+import {
+ Heading,
+ Modal,
+ NewButton,
+ NewIcon,
+ NewLink,
+ NewText,
+} from "@thunderstore/cyberstorm";
+import { faArrowRightToBracket } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { OverwolfLogo } from "@thunderstore/cyberstorm/src/svg/svg";
+import { classnames } from "@thunderstore/cyberstorm/src/utils/utils";
+import { buildAuthLoginUrl } from "cyberstorm/utils/ThunderstoreAuth";
+import { faDiscord, faGithub } from "@fortawesome/free-brands-svg-icons";
+
import styles from "./Navigation.module.css";
import { Modal, NewButton, NewIcon } from "@thunderstore/cyberstorm";
import { LoginList } from "./LoginList";
@@ -27,7 +43,98 @@ export function DesktopLoginPopover() {
}
>
-
+
+
+
+ Log in to Thunderstore
+
+
+
+
+
+
+ Connect with Discord
+
+
+
+
+
+ Connect with Github
+
+
+
+
+
+ Connect with Overwolf
+
+
+
+ By logging in and accessing the site you agree to{" "}
+
+ Terms and Conditions
+ {" "}
+ and{" "}
+
+ Privacy Policy
+
+
+
);
}
diff --git a/apps/cyberstorm-remix/cyberstorm/navigation/DevelopersDropDown.module.css b/apps/cyberstorm-remix/cyberstorm/navigation/DevelopersDropDown.module.css
index 50f68cd9b..cf4cb83bc 100644
--- a/apps/cyberstorm-remix/cyberstorm/navigation/DevelopersDropDown.module.css
+++ b/apps/cyberstorm-remix/cyberstorm/navigation/DevelopersDropDown.module.css
@@ -4,6 +4,10 @@
justify-content: space-between;
}
+.focus:not([data-highlighted]) a svg {
+ color: var(--color-tertiary);
+}
+
.root {
min-width: 14rem;
}
diff --git a/apps/cyberstorm-remix/cyberstorm/navigation/DevelopersDropDown.tsx b/apps/cyberstorm-remix/cyberstorm/navigation/DevelopersDropDown.tsx
index b62199532..e3a2c8c6d 100644
--- a/apps/cyberstorm-remix/cyberstorm/navigation/DevelopersDropDown.tsx
+++ b/apps/cyberstorm-remix/cyberstorm/navigation/DevelopersDropDown.tsx
@@ -24,7 +24,7 @@ export function DevelopersDropDown() {
}
csVariant="default"
- csColor="surface"
+ csColor="surface-alpha"
rootClasses={styles.root}
>
@@ -67,7 +67,7 @@ export function DevelopersDropDown() {
Markdown Preview
-
+
Github
-
+
diff --git a/apps/cyberstorm-remix/cyberstorm/navigation/Navigation.module.css b/apps/cyberstorm-remix/cyberstorm/navigation/Navigation.module.css
index a105b35e0..56d026bed 100644
--- a/apps/cyberstorm-remix/cyberstorm/navigation/Navigation.module.css
+++ b/apps/cyberstorm-remix/cyberstorm/navigation/Navigation.module.css
@@ -15,7 +15,6 @@
height: var(--header-height);
padding: 0 var(--space--12);
background: var(--body-bg-color-a);
- background-color: rgb(16 16 40 / 0.85);
box-shadow: 0 1px 10px 0 var(--body-bg-color);
backdrop-filter: blur(10px);
}
@@ -43,8 +42,12 @@
display: flex;
gap: var(--space--16);
align-items: center;
+}
- --dropdown-item-color: var(--color-primary) !important;
+.dropDownItem[data-highlighted] svg,
+.dropDownItem[data-highlighted],
+.dropDownItem {
+ color: var(--color-primary);
}
.dropDownUserInfo {
@@ -63,11 +66,6 @@
display: none;
}
-.mobileNavItemIconWrapper {
- height: 1.75rem;
- background: transparent;
-}
-
.mobileNavMenuDevelopersButton {
display: flex;
gap: 1rem;
@@ -75,9 +73,7 @@
align-self: stretch;
justify-content: space-between;
padding: 1rem;
- color: #f5f5f6;
- font-weight: 400;
- font-size: 0.875rem;
+ color: var(--color-primary);
background: transparent;
}
@@ -90,12 +86,20 @@
flex-direction: column;
flex-grow: 1;
align-items: center;
- color: #9c9cc4;
+ color: var(--color-tertiary);
font-weight: 400;
font-size: 0.75rem;
line-height: 1.2rem;
}
+button.mobileNavItem {
+ background: transparent;
+}
+
+.mobileNavItemIcon {
+ height: 1.375rem;
+}
+
.accountPopoverItem {
display: flex;
gap: 1rem;
@@ -137,6 +141,8 @@
.TSLoginLogo {
width: 3.12rem;
height: 2.79rem;
+ color: currentcolor;
+ fill: currentcolor;
}
.loginTitle {
@@ -151,6 +157,15 @@
max-width: 300px;
}
+.loginListMobile {
+ display: flex;
+ flex-direction: column;
+ gap: 2rem;
+ align-items: center;
+
+ /* justify-content: center; */
+}
+
.loginLinkList {
display: flex;
flex-direction: column;
@@ -168,6 +183,16 @@
color: #f5f5f6;
}
+.loginLinkMobile {
+ display: flex;
+ flex: 1 0 0;
+ gap: 1rem;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ border-radius: 0.5rem;
+ color: #f5f5f6;
+}
+
.loginLinkDiscord {
background: #5865f2;
}
@@ -186,7 +211,15 @@
--text-color: #8683be;
}
-@media (max-width: 63.5rem) {
+.mobileMenu {
+ display: none;
+}
+
+@media (width <= 63.5rem) {
+ .mobileMenu {
+ display: flex;
+ }
+
.desktopNavRoot {
display: none;
}
@@ -201,7 +234,7 @@
justify-content: space-evenly;
width: 100%;
padding: 0.5rem 1.5rem 0.25rem;
- background: rgb(16 16 40 / 0.85);
+ background: var(--body-bg-color-a);
backdrop-filter: blur(10px);
}
}
diff --git a/apps/cyberstorm-remix/cyberstorm/navigation/Navigation.tsx b/apps/cyberstorm-remix/cyberstorm/navigation/Navigation.tsx
index 2d6771553..6b83666b7 100644
--- a/apps/cyberstorm-remix/cyberstorm/navigation/Navigation.tsx
+++ b/apps/cyberstorm-remix/cyberstorm/navigation/Navigation.tsx
@@ -3,45 +3,40 @@ import {
faGamepad,
faLongArrowLeft,
faCaretRight,
+ faXmark,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import styles from "./Navigation.module.css";
import {
- CyberstormLink,
Menu,
LinkButton,
NewLink,
NewIcon,
+ Avatar,
+ NewText,
+ Heading,
} from "@thunderstore/cyberstorm";
-import { ThunderstoreLogo } from "@thunderstore/cyberstorm/src/svg/svg";
-import { useEffect, useRef, useState } from "react";
+import {
+ OverwolfLogo,
+ ThunderstoreLogo,
+} from "@thunderstore/cyberstorm/src/svg/svg";
import { DevelopersDropDown } from "./DevelopersDropDown";
import { DesktopUserDropdown } from "./DesktopUserDropdown";
import { DesktopLoginPopover } from "./DesktopLoginPopover";
-import { MobileUserPopoverContent } from "./MobileUserPopoverContent";
-import { emptyUser } from "@thunderstore/dapper-ts/src/methods/currentUser";
import { CurrentUser } from "@thunderstore/dapper/types";
-import { getDapper } from "cyberstorm/dapper/sessionUtils";
-import { useHydrated } from "remix-utils/use-hydrated";
-export function Navigation() {
- const isHydrated = useHydrated();
- const startsHydrated = useRef(isHydrated);
- const [currentUser, setCurrentUser] = useState();
+import { faSignOut } from "@fortawesome/free-solid-svg-icons";
+import { faDiscord, faGithub } from "@fortawesome/free-brands-svg-icons";
- useEffect(() => {
- if (!startsHydrated.current && isHydrated) return;
- const fetchAndSetUser = async () => {
- const dapper = await getDapper(true);
- const fetchedUser = await dapper.getCurrentUser();
- if (fetchedUser?.username) {
- setCurrentUser(fetchedUser);
- }
- };
- fetchAndSetUser();
- }, []);
+import { classnames } from "@thunderstore/cyberstorm/src/utils/utils";
+import { buildAuthLoginUrl } from "cyberstorm/utils/ThunderstoreAuth";
+export function Navigation(props: {
+ hydrationCheck: boolean;
+ currentUser?: CurrentUser;
+}) {
+ const { hydrationCheck, currentUser } = props;
return (
<>
@@ -62,7 +57,7 @@ export function Navigation() {
primitiveType="cyberstormLink"
linkId="Communities"
csSize="l"
- csColor="surface"
+ csColor="surface-alpha"
csVariant="tertiary"
>
Communities
@@ -81,7 +76,7 @@ export function Navigation() {
>
Get App
- {!startsHydrated.current && isHydrated && currentUser ? (
+ {hydrationCheck && currentUser ? (
) : (
@@ -90,146 +85,369 @@ export function Navigation() {
+ >
+ );
+}
+
+export function MobileNavigationMenu() {
+ return (
+
+