diff --git a/.claude/launch.json b/.claude/launch.json new file mode 100644 index 00000000..a3c09b0f --- /dev/null +++ b/.claude/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.0.1", + "configurations": [ + { + "name": "web-staging", + "runtimeExecutable": "pnpm", + "runtimeArgs": ["--filter", "web", "start:staging"], + "port": 5173 + } + ] +} diff --git a/.gitignore b/.gitignore index f3857a37..96db833e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,9 +23,13 @@ website/LICENSE *.md !README.md +!design-qa.md !docs/specs/internal-match-game-analysis.md !docs/plans/internal-match-game-analysis-p0-p1.md !docs/specs/double-elimination-connector-routing.md +!docs/specs/match-status-and-result-presentation.md +!docs/ux-audit-2026-11-10/06-ui-improvement-review.md +!docs/ux-audit-2026-11-10/07-visual-design-review.md !docs/plans/double-elimination-connector-routing.md !docs/plans/redis-8.10-optimization.md /tmp/ diff --git a/apps/web/package.json b/apps/web/package.json index 87ee4b45..50694258 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -19,10 +19,13 @@ "preview": "vite preview" }, "dependencies": { + "@astryxdesign/core": "0.7.11", + "@astryxdesign/theme-neutral": "0.7.11", "@azure/msal-browser": "^5.8.0", "@azure/msal-react": "^5.3.1", "@lolympus/contracts": "workspace:*", "@newrelic/browser-agent": "^1.318.0", + "@stylexjs/stylex": "0.19.1", "@tanstack/react-query": "^5.100.1", "lucide-react": "^1.14.0", "react": "^19.2.8", @@ -38,7 +41,6 @@ "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^6.0.1", - "daisyui": "^5.5.19", "eslint": "^9.39.4", "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.5.2", diff --git a/apps/web/src/App.css b/apps/web/src/App.css deleted file mode 100644 index e00a71c3..00000000 --- a/apps/web/src/App.css +++ /dev/null @@ -1 +0,0 @@ -/* App-specific styles — currently using Tailwind + daisyUI */ diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index b1fb1527..d415ef94 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -1,10 +1,10 @@ -import { BrowserRouter, Link, Route, Routes } from "react-router"; +import { BrowserRouter, Link, NavLink, Route, Routes } from "react-router"; import type { ReactNode } from "react"; import { useMsal } from "@azure/msal-react"; -import { Moon, Sun } from "lucide-react"; +import { LogOut, Moon, Sun } from "lucide-react"; import DevAuthSwitcher from "./components/DevAuthSwitcher"; import { DEFAULT_COMMUNITY_ID, setTheme, useTheme } from "./config"; -import { useCommunity } from "./api/hooks"; +import { useCommunity, useMe } from "./api/hooks"; import { isMsalConfigured } from "./lib/auth/msal.config"; import AuthCallbackPage from "./pages/AuthCallback"; import HomePage from "./pages/HomePage"; @@ -20,6 +20,24 @@ import LegacyImportPage from "./pages/admin/LegacyImportPage"; import LegacyMatchesPage from "./pages/admin/LegacyMatchesPage"; import MatchAdminPage from "./pages/admin/MatchAdminPage"; import TournamentCodesPage from "./pages/admin/TournamentCodesPage"; +import { PlainPage, Tooltip, pageWidthClass } from "./ui"; + +const NAV_ICON_BUTTON_CLASS = + "grid size-9 place-items-center rounded-field text-on-ink-muted transition-colors hover:bg-white/10 hover:text-on-ink"; + +function BrandMark() { + return ( + + ); +} function MsalHeaderActions() { const { accounts, instance } = useMsal(); @@ -28,7 +46,7 @@ function MsalHeaderActions() { if (!account) { return ( 로그인 @@ -36,15 +54,24 @@ function MsalHeaderActions() { ); } + const name = account.name ?? account.username; + return ( - +
+ + {name} + + + + +
); } @@ -56,32 +83,117 @@ function ThemeToggle() { const Icon = nextTheme === "dark" ? Moon : Sun; return ( - + - + + ); +} + +function PrimaryNavLink({ + to, + end, + children, +}: { + to: string; + end?: boolean; + children: ReactNode; +}) { + return ( + + `relative inline-flex h-14 items-center px-3 text-sm font-semibold transition-colors ${ + isActive + ? "text-on-ink after:absolute after:inset-x-3 after:bottom-0 after:h-[3px] after:rounded-t-full after:bg-brand-coral" + : "text-on-ink-muted hover:text-on-ink" + }` + } + > + {children} + + ); +} + +function AppHeader() { + const communityQuery = useCommunity(DEFAULT_COMMUNITY_ID); + const meQuery = useMe(); + const communityLabel = communityQuery.data?.name ?? "LOLYMPUS"; + const role = meQuery.data?.memberships.find( + (membership) => membership.community?._id === DEFAULT_COMMUNITY_ID, + )?.user?.role; + const canManage = role === "owner" || role === "admin"; + + return ( +
+
+
+ + + + {communityLabel} + + + {DEFAULT_COMMUNITY_ID && ( + + )} +
+
+ + {isMsalConfigured && } +
+
+
); } function AppFooter() { return ( -