feat(web): refresh the app with Astryx and coral branding
No files matched your search
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.0.1",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "web-staging",
|
||||
"runtimeExecutable": "pnpm",
|
||||
"runtimeArgs": ["--filter", "web", "start:staging"],
|
||||
"port": 5173
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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/
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/* App-specific styles — currently using Tailwind + daisyUI */
|
||||
@@ -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 (
|
||||
<svg viewBox="0 0 28 28" className="size-7 shrink-0" aria-hidden="true">
|
||||
<rect width="28" height="28" rx="8" fill="var(--color-brand-coral)" />
|
||||
<path
|
||||
d="M5.5 20.5 11 10l3.4 5.6L16.6 12l5.9 8.5Z"
|
||||
fill="#2a1704"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<circle cx="19.2" cy="8.4" r="1.9" fill="#2a1704" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
function MsalHeaderActions() {
|
||||
const { accounts, instance } = useMsal();
|
||||
@@ -28,7 +46,7 @@ function MsalHeaderActions() {
|
||||
if (!account) {
|
||||
return (
|
||||
<Link
|
||||
className="btn btn-ghost btn-sm px-2 text-base-content/60 hover:text-base-content"
|
||||
className="inline-flex h-9 items-center rounded-field bg-white/10 px-3.5 text-[13px] font-semibold text-on-ink transition-colors hover:bg-white/20"
|
||||
to="/login"
|
||||
>
|
||||
로그인
|
||||
@@ -36,15 +54,24 @@ function MsalHeaderActions() {
|
||||
);
|
||||
}
|
||||
|
||||
const name = account.name ?? account.username;
|
||||
|
||||
return (
|
||||
<div className="flex min-w-0 items-center gap-1">
|
||||
<span className="hidden max-w-40 truncate text-[13px] font-medium text-on-ink-muted sm:block">
|
||||
{name}
|
||||
</span>
|
||||
<Tooltip content="로그아웃" placement="below">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-ghost btn-sm px-3 max-w-[45vw] sm:max-w-none"
|
||||
className={NAV_ICON_BUTTON_CLASS}
|
||||
aria-label={`${name} 로그아웃`}
|
||||
onClick={() => void instance.logoutRedirect()}
|
||||
>
|
||||
<span className="truncate">{account.name ?? account.username}</span>
|
||||
<span className="hidden shrink-0 sm:inline">로그아웃</span>
|
||||
<LogOut className="size-4" aria-hidden="true" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -56,32 +83,117 @@ function ThemeToggle() {
|
||||
const Icon = nextTheme === "dark" ? Moon : Sun;
|
||||
|
||||
return (
|
||||
<span className="tooltip tooltip-bottom" data-tip={label}>
|
||||
<Tooltip content={label} placement="below">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-ghost btn-sm btn-square text-base-content/60 hover:text-base-content"
|
||||
className={NAV_ICON_BUTTON_CLASS}
|
||||
aria-label={label}
|
||||
onClick={() => setTheme(nextTheme)}
|
||||
>
|
||||
<Icon className="size-4" aria-hidden="true" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
function PrimaryNavLink({
|
||||
to,
|
||||
end,
|
||||
children,
|
||||
}: {
|
||||
to: string;
|
||||
end?: boolean;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<NavLink
|
||||
to={to}
|
||||
end={end}
|
||||
className={({ isActive }) =>
|
||||
`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}
|
||||
</NavLink>
|
||||
);
|
||||
}
|
||||
|
||||
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 (
|
||||
<header className="sticky top-0 z-50 border-b border-ink-line bg-ink">
|
||||
<div
|
||||
className={`${pageWidthClass("xl")} flex h-14 items-center justify-between gap-3`}
|
||||
>
|
||||
<div className="flex min-w-0 items-center gap-2 sm:gap-5">
|
||||
<Link
|
||||
className="flex shrink-0 items-center gap-2.5 text-on-ink"
|
||||
to="/"
|
||||
aria-label={`${communityLabel} 홈`}
|
||||
>
|
||||
<BrandMark />
|
||||
<span className="hidden text-[17px] font-extrabold tracking-[-0.02em] sm:block">
|
||||
{communityLabel}
|
||||
</span>
|
||||
</Link>
|
||||
{DEFAULT_COMMUNITY_ID && (
|
||||
<nav aria-label="주 메뉴" className="flex items-center">
|
||||
<PrimaryNavLink to="/" end>
|
||||
내전
|
||||
</PrimaryNavLink>
|
||||
<PrimaryNavLink
|
||||
to={`/communities/${DEFAULT_COMMUNITY_ID}/internal-stats`}
|
||||
>
|
||||
전적
|
||||
</PrimaryNavLink>
|
||||
{canManage && (
|
||||
<PrimaryNavLink
|
||||
to={`/admin/communities/${DEFAULT_COMMUNITY_ID}/matches`}
|
||||
>
|
||||
운영
|
||||
</PrimaryNavLink>
|
||||
)}
|
||||
</nav>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex shrink-0 items-center gap-1">
|
||||
<ThemeToggle />
|
||||
{isMsalConfigured && <MsalHeaderActions />}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
function AppFooter() {
|
||||
return (
|
||||
<footer className="border-t border-base-content/10 bg-base-100">
|
||||
<div className="max-w-5xl mx-auto px-4 sm:px-6 py-8 text-xs text-base-content/35">
|
||||
<nav className="flex items-center gap-4 mb-4 font-semibold text-base-content/45">
|
||||
<Link to="/terms" className="hover:text-base-content">
|
||||
<footer className="border-t border-line">
|
||||
<div
|
||||
className={`${pageWidthClass("xl")} flex flex-col gap-3 py-8 text-xs text-content-subtle`}
|
||||
>
|
||||
<nav
|
||||
aria-label="정책"
|
||||
className="flex items-center gap-4 font-semibold text-content-muted"
|
||||
>
|
||||
<Link to="/terms" className="hover:text-content">
|
||||
서비스 이용약관
|
||||
</Link>
|
||||
<Link to="/privacy" className="hover:text-base-content">
|
||||
<Link to="/privacy" className="hover:text-content">
|
||||
개인정보처리방침
|
||||
</Link>
|
||||
</nav>
|
||||
<p className="leading-relaxed max-w-4xl">
|
||||
<p className="max-w-4xl leading-relaxed">
|
||||
© 2026 LOLYMPUS. LOLYMPUS is not endorsed by Riot Games and does not
|
||||
reflect the views or opinions of Riot Games or anyone officially
|
||||
involved in producing or managing League of Legends. League of Legends
|
||||
@@ -101,51 +213,42 @@ function LegalPage({
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<main className="max-w-3xl mx-auto px-4 sm:px-6 py-12">
|
||||
<Link
|
||||
to="/"
|
||||
className="inline-flex text-xs text-base-content/40 hover:text-base-content mb-5"
|
||||
>
|
||||
← 홈으로
|
||||
</Link>
|
||||
<h1 className="text-2xl font-black text-base-content">{title}</h1>
|
||||
<div className="mt-6 space-y-4 text-sm leading-7 text-base-content/60">
|
||||
<PlainPage width="md" className="py-12">
|
||||
<h1 className="text-2xl font-extrabold text-content">{title}</h1>
|
||||
<div className="lts-panel mt-6 space-y-4 p-6 text-sm leading-7 text-content-muted">
|
||||
{children}
|
||||
</div>
|
||||
</main>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
function NotFoundPage() {
|
||||
return (
|
||||
<PlainPage width="md" className="py-24 text-center">
|
||||
<p className="tabular text-5xl font-extrabold text-content-disabled">
|
||||
404
|
||||
</p>
|
||||
<h1 className="mt-4 text-xl font-bold text-content">
|
||||
페이지를 찾을 수 없습니다
|
||||
</h1>
|
||||
<p className="mt-2 text-sm text-content-muted">
|
||||
주소가 바뀌었거나 삭제된 내전일 수 있습니다.
|
||||
</p>
|
||||
<Link
|
||||
to="/"
|
||||
className="mt-6 inline-flex h-10 items-center rounded-field bg-primary px-5 text-sm font-bold text-primary-content"
|
||||
>
|
||||
내전 목록으로
|
||||
</Link>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
function App() {
|
||||
const communityQuery = useCommunity(DEFAULT_COMMUNITY_ID);
|
||||
const communityLabel = communityQuery.data?.name ?? "LOLYMPUS";
|
||||
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<div className="min-h-screen bg-base-100 flex flex-col">
|
||||
<nav className="bg-base-100 border-b border-base-content/10 sticky top-0 z-50">
|
||||
<div className="max-w-5xl mx-auto px-4 sm:px-6 flex items-center justify-between h-12">
|
||||
<Link
|
||||
className="text-base font-bold tracking-tight text-base-content"
|
||||
to="/"
|
||||
>
|
||||
{communityLabel}
|
||||
</Link>
|
||||
<div className="flex items-center gap-3">
|
||||
{/* {DEFAULT_COMMUNITY_ID ? (
|
||||
<span className="text-xs uppercase tracking-wider text-base-content/25">
|
||||
API Live
|
||||
</span>
|
||||
) : (
|
||||
<span className="text-xs uppercase tracking-wider text-amber-500/70">
|
||||
Set `VITE_DEFAULT_COMMUNITY_ID`
|
||||
</span>
|
||||
)} */}
|
||||
<ThemeToggle />
|
||||
{isMsalConfigured && <MsalHeaderActions />}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div className="flex min-h-screen flex-col bg-body">
|
||||
<AppHeader />
|
||||
|
||||
<div className="flex-1">
|
||||
<Routes>
|
||||
@@ -226,6 +329,7 @@ function App() {
|
||||
</LegalPage>
|
||||
}
|
||||
/>
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
</div>
|
||||
<AppFooter />
|
||||
|
||||
@@ -354,15 +354,15 @@ export function formatTierLabel(tier?: ApiTierInfo) {
|
||||
export function getTierColorToken(tier?: ApiTierInfo) {
|
||||
switch (tier?.tier) {
|
||||
case "CHALLENGER":
|
||||
return "text-amber-400";
|
||||
return "text-gold";
|
||||
case "GRANDMASTER":
|
||||
return "text-red-400";
|
||||
return "text-loss";
|
||||
case "MASTER":
|
||||
return "text-fuchsia-400";
|
||||
case "DIAMOND":
|
||||
return "text-cyan-400";
|
||||
case "EMERALD":
|
||||
return "text-emerald-400";
|
||||
return "text-leaf";
|
||||
case "PLATINUM":
|
||||
return "text-teal-300";
|
||||
case "GOLD":
|
||||
@@ -370,7 +370,7 @@ export function getTierColorToken(tier?: ApiTierInfo) {
|
||||
case "SILVER":
|
||||
return "text-gray-300";
|
||||
case "BRONZE":
|
||||
return "text-amber-700";
|
||||
return "text-gold";
|
||||
case "IRON":
|
||||
return "text-stone-400";
|
||||
default:
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { NavLink } from "react-router";
|
||||
import { PageBody, PageHero } from "../ui";
|
||||
|
||||
const ADMIN_SECTIONS = [
|
||||
{ path: "matches", label: "내전 관리" },
|
||||
{ path: "tournament-codes", label: "토너먼트 코드" },
|
||||
{ path: "legacy-import", label: "과거 기록 가져오기" },
|
||||
{ path: "legacy-matches", label: "과거 기록 정리" },
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* 운영 화면 공통 틀. 네 개의 운영 도구를 한 줄 탭으로 오갈 수 있게 한다.
|
||||
*/
|
||||
export function AdminPage({
|
||||
communityId,
|
||||
title,
|
||||
description,
|
||||
actions,
|
||||
children,
|
||||
}: {
|
||||
communityId: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
actions?: ReactNode;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<PageHero
|
||||
width="xl"
|
||||
eyebrow="운영"
|
||||
title={title}
|
||||
meta={description}
|
||||
actions={actions}
|
||||
/>
|
||||
<PageBody width="xl">
|
||||
<nav
|
||||
aria-label="운영 메뉴"
|
||||
className="lts-panel no-scrollbar mb-5 flex gap-1 overflow-x-auto p-1"
|
||||
>
|
||||
{ADMIN_SECTIONS.map((section) => (
|
||||
<NavLink
|
||||
key={section.path}
|
||||
to={`/admin/communities/${communityId}/${section.path}`}
|
||||
className={({ isActive }) =>
|
||||
`flex h-10 shrink-0 items-center rounded-[10px] px-4 text-sm font-bold transition-colors ${
|
||||
isActive
|
||||
? "bg-secondary text-secondary-content dark:bg-white dark:text-[#14161b]"
|
||||
: "text-content-muted hover:bg-sunken hover:text-content"
|
||||
}`
|
||||
}
|
||||
>
|
||||
{section.label}
|
||||
</NavLink>
|
||||
))}
|
||||
</nav>
|
||||
{children}
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
/** 운영 화면의 권한·설정 안내. */
|
||||
export function AdminNotice({
|
||||
title,
|
||||
children,
|
||||
}: {
|
||||
title: string;
|
||||
children?: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<main className="mx-auto w-full max-w-3xl px-4 py-16 sm:px-6">
|
||||
<div className="lts-panel px-6 py-10 text-center">
|
||||
<h1 className="text-lg font-bold text-content">{title}</h1>
|
||||
{children && (
|
||||
<div className="mt-2 text-sm text-content-muted">{children}</div>
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
import { useState } from 'react';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import { FlaskConical, X } from 'lucide-react';
|
||||
import { setAuthUserId, useAuthUserId } from '../config';
|
||||
import { Button } from '../ui';
|
||||
|
||||
export default function DevAuthSwitcher() {
|
||||
const authUserId = useAuthUserId();
|
||||
@@ -17,12 +19,16 @@ export default function DevAuthSwitcher() {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 개발 서버 전용 인증 전환기. 기본은 접힌 알약이라 화면을 가리지 않는다.
|
||||
*/
|
||||
function DevAuthSwitcherForm({
|
||||
authUserId,
|
||||
}: {
|
||||
authUserId: string | null;
|
||||
}) {
|
||||
const queryClient = useQueryClient();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [inputValue, setInputValue] = useState(authUserId ?? '');
|
||||
|
||||
function updateAuthUserId(nextValue: string | null) {
|
||||
@@ -30,37 +36,60 @@ function DevAuthSwitcherForm({
|
||||
void queryClient.invalidateQueries();
|
||||
}
|
||||
|
||||
if (!isOpen) {
|
||||
return (
|
||||
<div className="fixed right-4 bottom-4 z-50 w-72 border border-base-content/10 bg-base-100/95 backdrop-blur px-3 py-3 shadow-xl">
|
||||
<div className="text-xs font-bold uppercase tracking-wider text-base-content/35">
|
||||
<button
|
||||
type="button"
|
||||
className="dev-auth-switcher fixed bottom-3 right-3 z-50 inline-flex h-8 items-center gap-1.5 rounded-full border border-line-strong bg-card px-3 text-xs font-semibold text-content-muted shadow-card hover:text-content"
|
||||
onClick={() => setIsOpen(true)}
|
||||
>
|
||||
<FlaskConical className="size-3.5" aria-hidden="true" />
|
||||
Dev Auth
|
||||
</div>
|
||||
<div className="mt-2 text-xs text-base-content/45">
|
||||
X-Auth-User-Id
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={`size-1.5 rounded-full ${authUserId ? 'bg-leaf' : 'bg-content-disabled'}`}
|
||||
/>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="dev-auth-switcher lts-panel fixed bottom-3 right-3 z-50 w-72 p-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-xs font-bold text-content-muted">
|
||||
Dev Auth · X-Auth-User-Id
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="닫기"
|
||||
className="grid size-6 place-items-center rounded-full text-content-subtle hover:bg-sunken hover:text-content"
|
||||
onClick={() => setIsOpen(false)}
|
||||
>
|
||||
<X className="size-3.5" aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
value={inputValue}
|
||||
onChange={(event) => setInputValue(event.target.value)}
|
||||
placeholder="Mongo User ID"
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-2 py-2 text-xs text-base-content focus:outline-none focus:border-primary/30"
|
||||
aria-label="Mongo User ID"
|
||||
className="lts-input mt-2 text-xs"
|
||||
/>
|
||||
<div className="mt-2 flex items-center gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-xs px-3"
|
||||
<Button
|
||||
label="Set"
|
||||
size="sm"
|
||||
variant="primary"
|
||||
onClick={() => updateAuthUserId(inputValue)}
|
||||
>
|
||||
Set
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-ghost btn-xs px-3"
|
||||
/>
|
||||
<Button
|
||||
label="Clear"
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
onClick={() => updateAuthUserId(null)}
|
||||
>
|
||||
Clear
|
||||
</button>
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-2 text-xs text-base-content/35 break-all">
|
||||
<div className="mt-2 break-all text-xs text-content-subtle">
|
||||
현재값: {authUserId ?? '없음'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
} from "../lib/internal-game-matchups";
|
||||
import { ItemIcon, RuneIcon, RuneStyleIcon } from "./ItemTooltip";
|
||||
|
||||
import { Tab, TabList } from "@astryxdesign/core/TabList";
|
||||
export type InternalGameDetailTab = "scoreboard" | "matchup" | "build";
|
||||
|
||||
type InternalGameDetail = ApiInternalMatchDetailResponse["games"][number];
|
||||
@@ -36,10 +37,10 @@ const SKILL_ROWS: Array<{
|
||||
label: string;
|
||||
className: string;
|
||||
}> = [
|
||||
{ slot: 1, label: "Q", className: "bg-blue-500 text-white" },
|
||||
{ slot: 1, label: "Q", className: "bg-win text-white" },
|
||||
{ slot: 2, label: "W", className: "bg-cyan-500 text-white" },
|
||||
{ slot: 3, label: "E", className: "bg-amber-500 text-black" },
|
||||
{ slot: 4, label: "R", className: "bg-red-500 text-white" },
|
||||
{ slot: 4, label: "R", className: "bg-loss text-white" },
|
||||
];
|
||||
|
||||
const STAT_PERK_LABELS: Record<number, string> = {
|
||||
@@ -71,16 +72,16 @@ function formatSignedNumber(value: number) {
|
||||
function sideTone(side: TeamSide) {
|
||||
return side === "blue"
|
||||
? {
|
||||
border: "border-blue-500/20",
|
||||
bg: "bg-blue-500/5",
|
||||
text: "text-blue-400",
|
||||
bar: "bg-blue-500",
|
||||
border: "border-win-line",
|
||||
bg: "bg-win-tint",
|
||||
text: "text-win",
|
||||
bar: "bg-win",
|
||||
}
|
||||
: {
|
||||
border: "border-red-500/20",
|
||||
bg: "bg-red-500/5",
|
||||
text: "text-red-400",
|
||||
bar: "bg-red-500",
|
||||
border: "border-loss-line",
|
||||
bg: "bg-loss-tint",
|
||||
text: "text-loss",
|
||||
bar: "bg-loss",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -672,7 +673,7 @@ function MatchupMetricRow({
|
||||
<div className="grid grid-cols-[1fr_auto_1fr] items-center gap-2 px-3 py-1.5 text-xs">
|
||||
<span
|
||||
className={`text-right tabular-nums ${
|
||||
blueLead ? "font-bold text-blue-400" : "text-base-content/55"
|
||||
blueLead ? "font-bold text-win" : "text-base-content/55"
|
||||
}`}
|
||||
>
|
||||
{blueText}
|
||||
@@ -687,7 +688,7 @@ function MatchupMetricRow({
|
||||
</span>
|
||||
<span
|
||||
className={`tabular-nums ${
|
||||
redLead ? "font-bold text-red-400" : "text-base-content/55"
|
||||
redLead ? "font-bold text-loss" : "text-base-content/55"
|
||||
}`}
|
||||
>
|
||||
{redText}
|
||||
@@ -899,11 +900,11 @@ function LaneMatchupPanel({
|
||||
<section className="overflow-hidden border border-base-content/10 bg-base-100">
|
||||
<div className="border-b border-base-content/8 px-4 py-3">
|
||||
<div className="grid grid-cols-[1fr_auto_1fr] items-center gap-3 text-xs font-bold">
|
||||
<span className="truncate text-right text-blue-400">
|
||||
<span className="truncate text-right text-win">
|
||||
{blueTeamName}
|
||||
</span>
|
||||
<span className="text-base-content/20">VS</span>
|
||||
<span className="truncate text-red-400">{redTeamName}</span>
|
||||
<span className="truncate text-loss">{redTeamName}</span>
|
||||
</div>
|
||||
<div
|
||||
className="mx-auto mt-3 flex w-fit border border-base-content/10"
|
||||
@@ -959,28 +960,19 @@ export function InternalGameDetailTabBar({
|
||||
onChange: (tab: InternalGameDetailTab) => void;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
className="flex flex-wrap border-b border-base-content/8"
|
||||
role="tablist"
|
||||
<TabList
|
||||
aria-label="상세 분석"
|
||||
value={activeTab}
|
||||
hasDivider
|
||||
onChange={(next) => {
|
||||
const tab = DETAIL_TABS.find((candidate) => candidate.id === next);
|
||||
if (tab) onChange(tab.id);
|
||||
}}
|
||||
>
|
||||
{DETAIL_TABS.map((tab) => (
|
||||
<button
|
||||
key={tab.id}
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-selected={activeTab === tab.id}
|
||||
onClick={() => onChange(tab.id)}
|
||||
className={`border-b-2 px-3 py-2 text-xs font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ${
|
||||
activeTab === tab.id
|
||||
? "border-primary bg-primary/5 text-primary"
|
||||
: "border-transparent text-base-content/45 hover:text-base-content"
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
</button>
|
||||
<Tab key={tab.id} value={tab.id} label={tab.label} />
|
||||
))}
|
||||
</div>
|
||||
</TabList>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { ApiTierInfo } from "../api/types";
|
||||
import { Tooltip } from "@astryxdesign/core/Tooltip";
|
||||
import { formatRankBadge, formatRankDetail } from "./rankBadgeUtils";
|
||||
|
||||
type RankBadgeSize = "sm" | "md";
|
||||
@@ -9,9 +10,12 @@ const SIZE_CLASSES: Record<RankBadgeSize, string> = {
|
||||
md: "h-[18px] min-w-[20px]",
|
||||
};
|
||||
|
||||
const TOOLTIP_CLASSES: Record<RankBadgeTooltipPlacement, string> = {
|
||||
left: "tooltip-left",
|
||||
bottom: "tooltip-bottom",
|
||||
const TOOLTIP_PLACEMENT: Record<
|
||||
RankBadgeTooltipPlacement,
|
||||
"start" | "below"
|
||||
> = {
|
||||
left: "start",
|
||||
bottom: "below",
|
||||
};
|
||||
|
||||
function rankBadgeClass(tier: ApiTierInfo | undefined) {
|
||||
@@ -53,17 +57,14 @@ export function RankBadge({
|
||||
const tooltip = formatRankDetail(tier);
|
||||
|
||||
return (
|
||||
<Tooltip content={tooltip} placement={TOOLTIP_PLACEMENT[tooltipPlacement]}>
|
||||
<span
|
||||
className={`tooltip ${TOOLTIP_CLASSES[tooltipPlacement]}`}
|
||||
data-tip={tooltip}
|
||||
>
|
||||
<span
|
||||
className={`inline-flex ${SIZE_CLASSES[size]} shrink-0 items-center justify-center whitespace-nowrap rounded-[3px] border px-1 text-xs font-black leading-none ${rankBadgeClass(tier)}`}
|
||||
className={`inline-flex ${SIZE_CLASSES[size]} shrink-0 items-center justify-center whitespace-nowrap rounded-[5px] border px-1 text-[11px] font-extrabold leading-none ${rankBadgeClass(tier)}`}
|
||||
aria-label={tooltip}
|
||||
>
|
||||
{formatRankBadge(tier)}
|
||||
</span>
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ export default function TierHistoryChart({
|
||||
</button>
|
||||
))}
|
||||
<select
|
||||
className="h-7 border border-base-content/10 bg-base-100 px-2 text-xs text-base-content focus:border-primary/30 focus:outline-none"
|
||||
className="lts-select"
|
||||
value={period}
|
||||
onChange={(event) => {
|
||||
const nextPeriod = event.target.value as PeriodKey;
|
||||
@@ -526,13 +526,13 @@ export default function TierHistoryChart({
|
||||
r={3}
|
||||
stroke="currentColor"
|
||||
fill="currentColor"
|
||||
className="text-amber-400"
|
||||
className="text-gold"
|
||||
label={{
|
||||
value: formatTierCompactLabel(summary.peak),
|
||||
position: "top",
|
||||
fill: "currentColor",
|
||||
fontSize: 10,
|
||||
className: "text-amber-400",
|
||||
className: "text-gold",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@@ -544,7 +544,7 @@ export default function TierHistoryChart({
|
||||
fill="currentColor"
|
||||
className={
|
||||
isSamePoint(summary.peak, summary.last)
|
||||
? "text-amber-400"
|
||||
? "text-gold"
|
||||
: "text-primary"
|
||||
}
|
||||
label={{
|
||||
@@ -553,7 +553,7 @@ export default function TierHistoryChart({
|
||||
fill: "currentColor",
|
||||
fontSize: 10,
|
||||
className: isSamePoint(summary.peak, summary.last)
|
||||
? "text-amber-400"
|
||||
? "text-gold"
|
||||
: "text-primary",
|
||||
}}
|
||||
/>
|
||||
@@ -582,7 +582,7 @@ export default function TierHistoryChart({
|
||||
</span>
|
||||
<span className="text-base-content/45">
|
||||
최고{" "}
|
||||
<span className="font-bold text-amber-400">
|
||||
<span className="font-bold text-gold">
|
||||
{formatTierLabel(summary.peak)}
|
||||
</span>
|
||||
</span>
|
||||
@@ -591,9 +591,9 @@ export default function TierHistoryChart({
|
||||
<span
|
||||
className={`font-bold ${
|
||||
summary.direction === "up"
|
||||
? "text-green-500"
|
||||
? "text-leaf"
|
||||
: summary.direction === "down"
|
||||
? "text-red-400"
|
||||
? "text-loss"
|
||||
: "text-base-content/55"
|
||||
}`}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
} from "../../api/hooks";
|
||||
import { ApiError } from "../../lib/api";
|
||||
|
||||
import { Btn } from "../../ui/Btn";
|
||||
type AdjudicationType = SeriesAdjudicationDecision["type"];
|
||||
|
||||
const ADJUDICATION_LABELS: Record<AdjudicationType, string> = {
|
||||
@@ -312,7 +313,7 @@ export function CompetitionAdminControls({
|
||||
<label className="mt-4 block text-xs font-bold text-base-content/55">
|
||||
Series
|
||||
<select
|
||||
className="mt-1.5 h-10 w-full border border-base-content/15 bg-base-100 px-3 text-sm focus:border-warning/50 focus:outline-none"
|
||||
className="lts-select mt-1.5 w-full"
|
||||
value={effectiveSelectedSeriesId}
|
||||
disabled={commandPending}
|
||||
onChange={(event) => handleSelectedSeriesChange(event.target.value)}
|
||||
@@ -364,7 +365,7 @@ export function CompetitionAdminControls({
|
||||
<label className="text-xs font-bold text-base-content/50">
|
||||
판정 유형
|
||||
<select
|
||||
className="mt-1.5 h-10 w-full border border-base-content/15 bg-base-100 px-3 text-sm focus:border-warning/50 focus:outline-none"
|
||||
className="lts-select mt-1.5 w-full"
|
||||
value={effectiveAdjudicationType}
|
||||
disabled={adjudicationMutation.isPending}
|
||||
onChange={(event) => {
|
||||
@@ -395,7 +396,7 @@ export function CompetitionAdminControls({
|
||||
<label className="text-xs font-bold text-base-content/50">
|
||||
승리 팀
|
||||
<select
|
||||
className="mt-1.5 h-10 w-full border border-base-content/15 bg-base-100 px-3 text-sm focus:border-warning/50 focus:outline-none"
|
||||
className="lts-select mt-1.5 w-full"
|
||||
value={effectiveWinnerTeamId}
|
||||
disabled={adjudicationMutation.isPending}
|
||||
onChange={(event) => {
|
||||
@@ -419,7 +420,7 @@ export function CompetitionAdminControls({
|
||||
<label className="block text-xs font-bold text-base-content/50">
|
||||
판정 사유
|
||||
<textarea
|
||||
className="mt-1.5 min-h-24 w-full resize-y border border-base-content/15 bg-base-100 px-3 py-2 text-sm focus:border-warning/50 focus:outline-none"
|
||||
className="lts-textarea mt-1.5 min-h-24 w-full resize-y"
|
||||
maxLength={2000}
|
||||
value={adjudicationReason}
|
||||
disabled={adjudicationMutation.isPending}
|
||||
@@ -432,9 +433,9 @@ export function CompetitionAdminControls({
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
<button
|
||||
<Btn
|
||||
type="submit"
|
||||
className="btn btn-warning btn-sm px-4 text-xs"
|
||||
variant="secondary"
|
||||
disabled={
|
||||
adjudicationMutation.isPending ||
|
||||
!adjudicationReason.trim() ||
|
||||
@@ -443,7 +444,7 @@ export function CompetitionAdminControls({
|
||||
}
|
||||
>
|
||||
{adjudicationMutation.isPending ? "기록 중..." : "판정 기록"}
|
||||
</button>
|
||||
</Btn>
|
||||
</form>
|
||||
) : canReverse && selectedSeries ? (
|
||||
<form className="mt-4 space-y-3" onSubmit={handlePreviewSubmit}>
|
||||
@@ -464,7 +465,7 @@ export function CompetitionAdminControls({
|
||||
<input
|
||||
type="radio"
|
||||
name="reversal-mode"
|
||||
className="radio radio-warning radio-xs mt-0.5"
|
||||
className="lts-checkbox mt-0.5"
|
||||
value={mode}
|
||||
checked={reversalMode === mode}
|
||||
disabled={
|
||||
@@ -495,7 +496,7 @@ export function CompetitionAdminControls({
|
||||
<label className="block text-xs font-bold text-base-content/50">
|
||||
되돌리기 사유
|
||||
<textarea
|
||||
className="mt-1.5 min-h-24 w-full resize-y border border-base-content/15 bg-base-100 px-3 py-2 text-sm focus:border-warning/50 focus:outline-none"
|
||||
className="lts-textarea mt-1.5 min-h-24 w-full resize-y"
|
||||
maxLength={2000}
|
||||
value={reversalReason}
|
||||
disabled={previewMutation.isPending || reversalMutation.isPending}
|
||||
@@ -511,9 +512,9 @@ export function CompetitionAdminControls({
|
||||
/>
|
||||
</label>
|
||||
|
||||
<button
|
||||
<Btn
|
||||
type="submit"
|
||||
className="btn btn-outline btn-sm px-4 text-xs"
|
||||
variant="secondary"
|
||||
disabled={
|
||||
previewMutation.isPending ||
|
||||
reversalMutation.isPending ||
|
||||
@@ -521,7 +522,7 @@ export function CompetitionAdminControls({
|
||||
}
|
||||
>
|
||||
{previewMutation.isPending ? "계산 중..." : "영향 미리보기"}
|
||||
</button>
|
||||
</Btn>
|
||||
|
||||
{reversalPreview && (
|
||||
<ReversalImpactPanel
|
||||
@@ -632,21 +633,20 @@ function ReversalImpactPanel({
|
||||
<label className="mt-3 flex items-start gap-2 text-xs text-base-content/60">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="checkbox checkbox-error checkbox-xs mt-0.5"
|
||||
className="lts-checkbox mt-0.5"
|
||||
checked={confirmed}
|
||||
disabled={!previewIsCurrent || executing}
|
||||
onChange={(event) => onConfirmedChange(event.target.checked)}
|
||||
/>
|
||||
표시된 Series, 사실, 코드 및 통계 영향을 확인했습니다.
|
||||
</label>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-error btn-sm mt-3 px-4 text-xs"
|
||||
<Btn
|
||||
variant="destructive" className="mt-3"
|
||||
disabled={!confirmed || !previewIsCurrent || executing}
|
||||
onClick={onExecute}
|
||||
>
|
||||
{executing ? "되돌리는 중..." : "Hash 확인 후 되돌리기"}
|
||||
</button>
|
||||
</Btn>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ export function MatchDetailTabBar({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="sticky top-12 z-40 -mx-4 border-y border-base-content/10 bg-base-100/95 px-4 backdrop-blur sm:-mx-6 sm:px-6">
|
||||
<div className="lts-panel sticky top-[60px] z-40 p-1">
|
||||
<div
|
||||
className="flex overflow-x-auto"
|
||||
className="no-scrollbar flex gap-1 overflow-x-auto"
|
||||
role="tablist"
|
||||
aria-label="내전 상세"
|
||||
>
|
||||
@@ -77,10 +77,10 @@ export function MatchDetailTabBar({
|
||||
tabIndex={selected ? 0 : -1}
|
||||
onClick={() => onChange(tab.id)}
|
||||
onKeyDown={(event) => handleKeyDown(event, tab.id)}
|
||||
className={`min-h-11 flex-none whitespace-nowrap border-b-2 px-4 text-xs font-bold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ${
|
||||
className={`h-10 flex-none whitespace-nowrap rounded-[10px] px-4 text-sm font-bold transition-colors sm:px-5 ${
|
||||
selected
|
||||
? "border-primary bg-primary/5 text-base-content"
|
||||
: "border-transparent text-base-content/45 hover:bg-base-content/[0.03] hover:text-base-content"
|
||||
? "bg-secondary text-secondary-content dark:bg-white dark:text-[#14161b]"
|
||||
: "text-content-muted hover:bg-sunken hover:text-content"
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
|
||||
@@ -251,7 +251,7 @@ function AutoSizingCodeField({
|
||||
<textarea
|
||||
ref={fieldRef}
|
||||
aria-label={label}
|
||||
className="block min-h-11 w-full resize-none overflow-hidden border border-base-content/15 bg-base-100 px-3 py-2 font-mono text-sm font-bold leading-5 text-base-content focus-visible:ring-2 focus-visible:ring-primary"
|
||||
className="lts-textarea min-h-11 w-full resize-none overflow-hidden font-mono font-bold leading-5"
|
||||
onClick={(event) => event.currentTarget.select()}
|
||||
onFocus={(event) => event.currentTarget.select()}
|
||||
readOnly
|
||||
|
||||
@@ -1,137 +1,384 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Asta+Sans:wght@300..800&family=Gamja+Flower&display=swap");
|
||||
/*
|
||||
* LOLYMPUS 스타일 진입점.
|
||||
*
|
||||
* 레이어 순서(낮음 → 높음):
|
||||
* reset → theme → base → astryx-base → astryx-theme → lolympus → components → utilities
|
||||
*
|
||||
* Astryx(core + Neutral 테마)가 프리미티브의 모양을 맡고, `lolympus` 레이어가
|
||||
* Neutral 토큰을 LOLYMPUS 팔레트로 덮는다. Tailwind 유틸리티는 아래 @theme 매핑을
|
||||
* 통해 같은 토큰을 읽으므로 라이트/다크 전환은 토큰 한 곳에서만 일어난다.
|
||||
*/
|
||||
@layer reset, theme, base, astryx-base, astryx-theme, lolympus, components, utilities;
|
||||
|
||||
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
|
||||
|
||||
@import "tailwindcss/theme.css" layer(theme);
|
||||
@import "tailwindcss/preflight.css" layer(base);
|
||||
@import "@astryxdesign/core/reset.css";
|
||||
@import "@astryxdesign/core/astryx.css";
|
||||
@import "@astryxdesign/theme-neutral/theme.css";
|
||||
@import "tailwindcss/utilities.css" layer(utilities);
|
||||
|
||||
@import "tailwindcss";
|
||||
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
|
||||
@plugin "daisyui" {
|
||||
themes:
|
||||
light --default,
|
||||
dark;
|
||||
}
|
||||
|
||||
/* ── 브랜드 원색 ──
|
||||
실제 색상값은 이곳에서만 관리하고, 화면에서는 아래의 의미 토큰을 사용한다. */
|
||||
/* ── 원색 ──
|
||||
실제 색상값은 이곳에서만 관리한다. 화면은 아래 역할 토큰을 쓴다. */
|
||||
@theme static {
|
||||
--color-brand-coral: oklch(0.708008 0.234375 24);
|
||||
--color-brand-violet: oklch(0.481934 0.285938 285);
|
||||
--color-brand-gold: oklch(0.853027 0.2 90);
|
||||
--color-brand-cyan: oklch(70% 0.14523 200);
|
||||
--color-brand-coral: oklch(70.8008% .234375 24);
|
||||
--color-brand-ink: #22252e;
|
||||
--color-brand-gold: #f2b01e;
|
||||
--color-brand-leaf: #2f9e58;
|
||||
}
|
||||
|
||||
html {
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family:
|
||||
"Asta Sans",
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
system-ui,
|
||||
Roboto,
|
||||
"Helvetica Neue",
|
||||
"Segoe UI",
|
||||
"Apple SD Gothic Neo",
|
||||
"Noto Sans KR",
|
||||
"Malgun Gothic",
|
||||
"Apple Color Emoji",
|
||||
"Segoe UI Emoji",
|
||||
"Segoe UI Symbol",
|
||||
@layer lolympus {
|
||||
:root,
|
||||
[data-astryx-theme="neutral"] {
|
||||
/* 글자 */
|
||||
--font-family-body:
|
||||
"Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
|
||||
system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic",
|
||||
sans-serif;
|
||||
--font-family-heading: var(--font-family-body);
|
||||
|
||||
/* 모서리: 카드는 넉넉하게, 조작 요소는 한 단계 작게 */
|
||||
--radius-inner: 0.375rem;
|
||||
--radius-element: 0.5rem;
|
||||
--radius-container: 0.875rem;
|
||||
--radius-page: 1.25rem;
|
||||
|
||||
/* 표면 */
|
||||
--color-background-body: light-dark(#f1f2f6, #14161b);
|
||||
--color-background-card: light-dark(#ffffff, #1e2129);
|
||||
--color-background-surface: light-dark(#ffffff, #1e2129);
|
||||
--color-background-popover: light-dark(#ffffff, #272b35);
|
||||
--color-background-muted: light-dark(#f4f5f8, #262a33);
|
||||
|
||||
/* 글자·선 */
|
||||
--color-text-primary: light-dark(#1b1e26, #f1f2f5);
|
||||
--color-text-secondary: light-dark(#5a6170, #a4abb8);
|
||||
--color-text-disabled: light-dark(#a6acb8, #5d6471);
|
||||
--color-icon-primary: var(--color-text-primary);
|
||||
--color-icon-secondary: var(--color-text-secondary);
|
||||
--color-border: light-dark(#1b1e2614, #ffffff17);
|
||||
--color-border-emphasized: light-dark(#d3d7df, #414653);
|
||||
|
||||
/* 주 액션: 브랜드 코랄 위에 짙은 글자 */
|
||||
--color-accent: var(--color-brand-coral);
|
||||
--color-on-accent: light-dark(#2a1704, #1f1203);
|
||||
--color-accent-muted: light-dark(
|
||||
color-mix(in oklab, var(--color-brand-coral) 18%, white),
|
||||
color-mix(in oklab, var(--color-brand-coral) 25%, var(--color-background-body))
|
||||
);
|
||||
--color-text-accent: light-dark(
|
||||
color-mix(in oklab, var(--color-brand-coral) 75%, black),
|
||||
color-mix(in oklab, var(--color-brand-coral) 78%, white)
|
||||
);
|
||||
--color-icon-accent: var(--color-text-accent);
|
||||
|
||||
/* ── LOLYMPUS 전용 역할 ── */
|
||||
/* 상단 내비게이션과 페이지 머리 띠. 두 테마 모두 짙은 잉크색이다. */
|
||||
--lts-ink: light-dark(var(--color-brand-ink), #0e1014);
|
||||
--lts-ink-raised: light-dark(#2e323d, #1a1d24);
|
||||
--lts-ink-line: #ffffff1f;
|
||||
--lts-on-ink: #f4f5f7;
|
||||
--lts-on-ink-muted: #b3b9c6;
|
||||
|
||||
/* 들어간 표면(표 머리, 통계 칸, 입력 배경) */
|
||||
--lts-sunken: light-dark(#f6f7f9, #181b21);
|
||||
--lts-sunken-strong: light-dark(#eceef2, #2b2f39);
|
||||
--lts-text-tertiary: light-dark(#7d8493, #848b99);
|
||||
|
||||
/* 경기 결과와 진영 */
|
||||
--lts-win: light-dark(#2c6be0, #7fabff);
|
||||
--lts-win-fill: light-dark(#4d8bf5, #4d8bf5);
|
||||
--lts-win-tint: light-dark(#eaf1ff, #1c2a47);
|
||||
--lts-win-line: light-dark(#c9dbfb, #2f4470);
|
||||
--lts-loss: light-dark(#d93a4d, #ff8c97);
|
||||
--lts-loss-fill: light-dark(#ec5567, #ec5567);
|
||||
--lts-loss-tint: light-dark(#ffeef0, #40212a);
|
||||
--lts-loss-line: light-dark(#f8cfd5, #6a3140);
|
||||
--lts-gold: light-dark(#a86a00, #f5c451);
|
||||
--lts-gold-fill: var(--color-brand-gold);
|
||||
--lts-gold-tint: light-dark(#fff5d9, #3d3113);
|
||||
--lts-leaf: light-dark(#23804a, #74d199);
|
||||
--lts-leaf-fill: light-dark(var(--color-brand-leaf), #3bb56d);
|
||||
--lts-leaf-tint: light-dark(#e6f6ec, #17352a);
|
||||
|
||||
--lts-shadow-card:
|
||||
0 1px 2px light-dark(#1b1e260a, #00000040),
|
||||
0 2px 8px light-dark(#1b1e260a, #00000033);
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
html {
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--color-background-body);
|
||||
color: var(--color-text-primary);
|
||||
font-family: var(--font-family-body);
|
||||
font-size: 15px;
|
||||
line-height: 1.55;
|
||||
font-feature-settings: "ss06";
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── 가독성 개선: 의미 기반 텍스트 대비 토큰 ──
|
||||
폰트 크기는 표준 스케일 토큰(text-xs=12px / text-sm=14px …)을 사용한다.
|
||||
새 코드에서는 text-content-subtle/muted/disabled를 우선 사용한다. */
|
||||
:root,
|
||||
[data-theme="light"] {
|
||||
--lts-text-subtle-strength: 66%;
|
||||
--lts-text-muted-strength: 72%;
|
||||
--lts-text-disabled-strength: 50%;
|
||||
--lts-content-subtle: color-mix(
|
||||
in oklab,
|
||||
var(--color-base-content) var(--lts-text-subtle-strength),
|
||||
transparent
|
||||
);
|
||||
--lts-content-muted: color-mix(
|
||||
in oklab,
|
||||
var(--color-base-content) var(--lts-text-muted-strength),
|
||||
transparent
|
||||
);
|
||||
--lts-content-disabled: color-mix(
|
||||
in oklab,
|
||||
var(--color-base-content) var(--lts-text-disabled-strength),
|
||||
transparent
|
||||
);
|
||||
}
|
||||
@layer lolympus {
|
||||
/* Neutral의 prose 초기화는 h/p에 크기·색을 직접 지정한다. 화면 마크업은
|
||||
부모에게서 상속받는 것을 전제로 작성했으므로 상속으로 되돌린다.
|
||||
Astryx의 Heading/Text는 자체 클래스로 모양을 정하므로 영향이 없다. */
|
||||
:where(h1, h2, h3, h4, h5, h6, p, small) {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
[data-theme="dark"] {
|
||||
--lts-text-subtle-strength: 66%;
|
||||
--lts-text-muted-strength: 76%;
|
||||
--lts-text-disabled-strength: 52%;
|
||||
/* 테두리를 두른 상자·칩의 기본 모서리. rounded-* 유틸리티가 항상 이긴다. */
|
||||
:where(
|
||||
div,
|
||||
section,
|
||||
article,
|
||||
aside,
|
||||
li,
|
||||
ul,
|
||||
a,
|
||||
form,
|
||||
label,
|
||||
details,
|
||||
summary,
|
||||
span,
|
||||
button,
|
||||
img
|
||||
).border {
|
||||
border-radius: var(--radius-element);
|
||||
}
|
||||
|
||||
:where(button, [role="button"]) {
|
||||
border-radius: var(--radius-element);
|
||||
}
|
||||
|
||||
/* 챔피언·아이템·프로필 그림과 그 틀은 살짝 둥글린다. */
|
||||
:where(img) {
|
||||
border-radius: var(--radius-inner);
|
||||
}
|
||||
:where(div, span).overflow-hidden:has(> img:only-child) {
|
||||
border-radius: var(--radius-inner);
|
||||
}
|
||||
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--color-text-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Tailwind 유틸리티 ↔ 토큰 매핑 ──
|
||||
base-100·primary 같은 이름은 기존 마크업과의 호환을 위해 유지한다. 새 코드는
|
||||
card / sunken / ink / win / loss 같은 역할 이름을 쓴다. */
|
||||
@theme inline {
|
||||
--color-content-subtle: var(--lts-content-subtle);
|
||||
--color-content-muted: var(--lts-content-muted);
|
||||
--color-content-disabled: var(--lts-content-disabled);
|
||||
--color-bracket-winner: var(--color-brand-coral);
|
||||
--font-sans: var(--font-family-body);
|
||||
|
||||
--color-base-100: var(--color-background-card);
|
||||
--color-base-200: var(--lts-sunken);
|
||||
--color-base-300: var(--lts-sunken-strong);
|
||||
--color-base-content: var(--color-text-primary);
|
||||
|
||||
--color-body: var(--color-background-body);
|
||||
--color-card: var(--color-background-card);
|
||||
--color-sunken: var(--lts-sunken);
|
||||
--color-sunken-strong: var(--lts-sunken-strong);
|
||||
--color-line: var(--color-border);
|
||||
--color-line-strong: var(--color-border-emphasized);
|
||||
|
||||
--color-content: var(--color-text-primary);
|
||||
--color-content-muted: var(--color-text-secondary);
|
||||
--color-content-subtle: var(--lts-text-tertiary);
|
||||
--color-content-disabled: var(--color-text-disabled);
|
||||
|
||||
--color-ink: var(--lts-ink);
|
||||
--color-ink-raised: var(--lts-ink-raised);
|
||||
--color-ink-line: var(--lts-ink-line);
|
||||
--color-on-ink: var(--lts-on-ink);
|
||||
--color-on-ink-muted: var(--lts-on-ink-muted);
|
||||
|
||||
/* primary: 채움은 브랜드 코랄, 글자·선은 테마에 맞춘 코랄 */
|
||||
--color-primary: var(--color-accent);
|
||||
--text-color-primary: var(--color-text-accent);
|
||||
--text-decoration-color-primary: var(--color-text-accent);
|
||||
--color-primary-content: var(--color-on-accent);
|
||||
--color-primary-tint: var(--color-accent-muted);
|
||||
|
||||
--color-secondary: var(--lts-ink);
|
||||
--color-secondary-content: var(--lts-on-ink);
|
||||
--text-color-secondary: var(--color-text-secondary);
|
||||
|
||||
--color-accent: var(--lts-gold-fill);
|
||||
--text-color-accent: var(--lts-gold);
|
||||
--color-accent-content: #2a1f04;
|
||||
|
||||
--color-win: var(--lts-win-fill);
|
||||
--text-color-win: var(--lts-win);
|
||||
--color-win-tint: var(--lts-win-tint);
|
||||
--color-win-line: var(--lts-win-line);
|
||||
--color-loss: var(--lts-loss-fill);
|
||||
--text-color-loss: var(--lts-loss);
|
||||
--color-loss-tint: var(--lts-loss-tint);
|
||||
--color-loss-line: var(--lts-loss-line);
|
||||
--color-gold: var(--lts-gold-fill);
|
||||
--text-color-gold: var(--lts-gold);
|
||||
--color-gold-tint: var(--lts-gold-tint);
|
||||
--color-leaf: var(--lts-leaf-fill);
|
||||
--text-color-leaf: var(--lts-leaf);
|
||||
--color-leaf-tint: var(--lts-leaf-tint);
|
||||
|
||||
--color-info: var(--lts-win-fill);
|
||||
--text-color-info: var(--lts-win);
|
||||
--color-info-content: #ffffff;
|
||||
--color-success: var(--lts-leaf-fill);
|
||||
--text-color-success: var(--lts-leaf);
|
||||
--color-success-content: #ffffff;
|
||||
--color-warning: var(--lts-gold-fill);
|
||||
--text-color-warning: var(--lts-gold);
|
||||
--color-warning-content: #2a1f04;
|
||||
--color-error: var(--lts-loss-fill);
|
||||
--text-color-error: var(--lts-loss);
|
||||
--color-error-content: #ffffff;
|
||||
|
||||
--color-bracket-winner: var(--color-text-accent);
|
||||
|
||||
--radius-box: var(--radius-container);
|
||||
--radius-field: var(--radius-element);
|
||||
--shadow-card: var(--lts-shadow-card);
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
/* 기존 text-base-content/nn 알파 클래스 호환 shim.
|
||||
hover/focus 상태 유틸이 specificity로 이길 수 있도록 !important를 쓰지 않는다. */
|
||||
/* 낮은 알파의 본문색 글자는 대비가 무너진다. 3단 역할색으로 올려 붙인다.
|
||||
hover/focus 유틸이 specificity로 이길 수 있도록 !important를 쓰지 않는다. */
|
||||
.text-base-content\/15,
|
||||
.text-base-content\/20,
|
||||
.text-base-content\/25,
|
||||
.text-base-content\/30,
|
||||
.text-base-content\/35 {
|
||||
color: var(--lts-content-subtle);
|
||||
}
|
||||
|
||||
.text-base-content\/35,
|
||||
.text-base-content\/40,
|
||||
.text-base-content\/45,
|
||||
.text-base-content\/45 {
|
||||
color: var(--lts-text-tertiary);
|
||||
}
|
||||
|
||||
.text-base-content\/50,
|
||||
.text-base-content\/55 {
|
||||
color: var(--lts-content-muted);
|
||||
.text-base-content\/55,
|
||||
.text-base-content\/60,
|
||||
.text-base-content\/65,
|
||||
.text-base-content\/70 {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.tabular {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* 이전/다음 조작이 따로 있는 가로 스크롤 띠에서 스크롤바를 숨긴다. */
|
||||
.no-scrollbar {
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.no-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── 라이트 테마 의미 색상 ── */
|
||||
[data-theme="light"] {
|
||||
/* ── 포인트 4색 (primary 주 액션 / secondary 강조 / accent 하이라이트 / info 정보·보조) ── */
|
||||
@layer components {
|
||||
/* 흰 카드. 페이지의 기본 데이터 그릇이다. */
|
||||
.lts-panel {
|
||||
background: var(--color-background-card);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-container);
|
||||
box-shadow: var(--lts-shadow-card);
|
||||
}
|
||||
|
||||
/* 코랄레드 — primary 117곳 즉시 반영 */
|
||||
--color-primary: var(--color-brand-coral);
|
||||
--color-primary-content: oklch(98% 0 0); /* 흰 글자 */
|
||||
/* 표: 머리는 들어간 표면, 행은 선 하나로만 나눈다. */
|
||||
.lts-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.lts-table thead th {
|
||||
background: var(--lts-sunken);
|
||||
color: var(--lts-text-tertiary);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
padding: 0.5rem 0.75rem;
|
||||
white-space: nowrap;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
.lts-table tbody td {
|
||||
padding: 0.625rem 0.75rem;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
.lts-table tbody tr:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
/* 바이올렛 — 버튼·뱃지·보더용 */
|
||||
--color-secondary: var(--color-brand-violet);
|
||||
--color-secondary-content: oklch(98% 0 0); /* 흰 글자 */
|
||||
|
||||
/* 골드 — 배경·보더·아이콘만. 텍스트색(text-accent)으론 쓰지 말 것 */
|
||||
--color-accent: var(--color-brand-gold);
|
||||
--color-accent-content: oklch(22% 0.03 80); /* 어두운 글자 */
|
||||
|
||||
/* 시안 — 정보·링크·보조 강조. L70이라 흰배경 텍스트는 약함 → 배경/보더 위주 */
|
||||
--color-info: var(--color-brand-cyan);
|
||||
--color-info-content: oklch(24% 0.03 215); /* 어두운 글자 */
|
||||
|
||||
/* 텍스트 기본 진하기 (회색 알파의 기준색). 낮출수록 전체가 진해짐 */
|
||||
--color-base-content: oklch(21% 0.006 285.885);
|
||||
|
||||
/* 표면 톤 */
|
||||
--color-base-100: oklch(100% 0 0); /* 페이지/카드 배경 */
|
||||
--color-base-200: oklch(98% 0 0); /* 살짝 들어간 표면 */
|
||||
--color-base-300: oklch(95% 0 0); /* 구분선/보더 */
|
||||
}
|
||||
|
||||
/* 경기 결과 기록의 링크 강조는 양쪽 테마에서 같은 브랜드 코랄을 쓴다.
|
||||
전역 dark primary는 유지해 다른 화면의 기존 색상 의미를 바꾸지 않는다. */
|
||||
.competition-series-history {
|
||||
--color-primary: var(--color-brand-coral);
|
||||
/* 네이티브 입력. 옵션이 많은 운영 폼은 네이티브 조작을 유지하고 모양만 맞춘다. */
|
||||
.lts-input,
|
||||
.lts-select,
|
||||
.lts-textarea {
|
||||
width: 100%;
|
||||
min-height: 2.25rem;
|
||||
padding: 0.375rem 0.75rem;
|
||||
background: var(--color-background-card);
|
||||
color: var(--color-text-primary);
|
||||
border: 1px solid var(--color-border-emphasized);
|
||||
border-radius: var(--radius-element);
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.4;
|
||||
transition:
|
||||
border-color 120ms,
|
||||
box-shadow 120ms;
|
||||
}
|
||||
.lts-input::placeholder,
|
||||
.lts-textarea::placeholder {
|
||||
color: var(--color-text-disabled);
|
||||
}
|
||||
.lts-input:hover,
|
||||
.lts-select:hover,
|
||||
.lts-textarea:hover {
|
||||
border-color: var(--lts-text-tertiary);
|
||||
}
|
||||
.lts-input:focus-visible,
|
||||
.lts-select:focus-visible,
|
||||
.lts-textarea:focus-visible {
|
||||
outline: none;
|
||||
border-color: var(--color-text-accent);
|
||||
box-shadow: 0 0 0 3px var(--color-accent-muted);
|
||||
}
|
||||
.lts-input:disabled,
|
||||
.lts-select:disabled,
|
||||
.lts-textarea:disabled {
|
||||
background: var(--lts-sunken);
|
||||
color: var(--color-text-disabled);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.lts-select {
|
||||
appearance: none;
|
||||
padding-right: 2rem;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d8493' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 0.625rem center;
|
||||
}
|
||||
.lts-textarea {
|
||||
min-height: 5rem;
|
||||
resize: vertical;
|
||||
}
|
||||
.lts-checkbox {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
accent-color: var(--color-text-accent);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── 실시간 입찰 피드백 모션 ──
|
||||
@@ -178,26 +425,3 @@ body {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* poro.gg style: 모든 모서리 각지게 */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
/* daisyUI badge만 살짝 둥글게 (pill 형태) */
|
||||
.badge {
|
||||
border-radius: 2px !important;
|
||||
}
|
||||
|
||||
/* 버튼도 각지게 */
|
||||
.btn {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
/* daisyUI 버튼의 흰색 inset 하이라이트 제거 — 색 위에 흰색을 6% 얹어
|
||||
채도를 깎던 주범(P3/쨍한 색일수록 도드라짐). drop shadow(입체감)는 유지. */
|
||||
.btn {
|
||||
box-shadow: var(--btn-shadow) !important;
|
||||
}
|
||||
@@ -23,30 +23,55 @@ export const positionIcon: Record<Position, string> = {
|
||||
SUP: supportIcon,
|
||||
};
|
||||
|
||||
// 팀 식별색. 8팀 대회까지 서로 다른 색을 쓰고 그 이상은 순환한다.
|
||||
const TEAM_TONES = [
|
||||
{
|
||||
border: 'border-blue-500/20',
|
||||
bg: 'bg-blue-500/5',
|
||||
text: 'text-blue-400',
|
||||
bar: 'bg-blue-500',
|
||||
border: "border-blue-500/30",
|
||||
bg: "bg-blue-500/8",
|
||||
text: "text-blue-600 dark:text-blue-300",
|
||||
bar: "bg-blue-500",
|
||||
},
|
||||
{
|
||||
border: 'border-red-500/20',
|
||||
bg: 'bg-red-500/5',
|
||||
text: 'text-red-400',
|
||||
bar: 'bg-red-500',
|
||||
border: "border-red-500/30",
|
||||
bg: "bg-red-500/8",
|
||||
text: "text-red-600 dark:text-red-300",
|
||||
bar: "bg-red-500",
|
||||
},
|
||||
{
|
||||
border: 'border-emerald-500/20',
|
||||
bg: 'bg-emerald-500/5',
|
||||
text: 'text-emerald-400',
|
||||
bar: 'bg-emerald-500',
|
||||
border: "border-emerald-500/30",
|
||||
bg: "bg-emerald-500/8",
|
||||
text: "text-emerald-600 dark:text-emerald-300",
|
||||
bar: "bg-emerald-500",
|
||||
},
|
||||
{
|
||||
border: 'border-amber-500/20',
|
||||
bg: 'bg-amber-500/5',
|
||||
text: 'text-amber-400',
|
||||
bar: 'bg-amber-500',
|
||||
border: "border-amber-500/30",
|
||||
bg: "bg-amber-500/8",
|
||||
text: "text-amber-700 dark:text-amber-300",
|
||||
bar: "bg-amber-500",
|
||||
},
|
||||
{
|
||||
border: "border-violet-500/30",
|
||||
bg: "bg-violet-500/8",
|
||||
text: "text-violet-600 dark:text-violet-300",
|
||||
bar: "bg-violet-500",
|
||||
},
|
||||
{
|
||||
border: "border-cyan-500/30",
|
||||
bg: "bg-cyan-500/8",
|
||||
text: "text-cyan-600 dark:text-cyan-300",
|
||||
bar: "bg-cyan-500",
|
||||
},
|
||||
{
|
||||
border: "border-pink-500/30",
|
||||
bg: "bg-pink-500/8",
|
||||
text: "text-pink-600 dark:text-pink-300",
|
||||
bar: "bg-pink-500",
|
||||
},
|
||||
{
|
||||
border: "border-lime-500/30",
|
||||
bg: "bg-lime-500/8",
|
||||
text: "text-lime-700 dark:text-lime-300",
|
||||
bar: "bg-lime-500",
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import './index.css';
|
||||
import App from './App.tsx';
|
||||
import { MsalAppProvider } from './lib/auth/MsalAppProvider.tsx';
|
||||
import { initializeTheme } from './config.ts';
|
||||
import { AppTheme } from './ui/AppTheme.tsx';
|
||||
|
||||
initializeNewRelicBrowserAgent();
|
||||
initializeTheme();
|
||||
@@ -24,7 +25,9 @@ createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<MsalAppProvider>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<AppTheme>
|
||||
<App />
|
||||
</AppTheme>
|
||||
</QueryClientProvider>
|
||||
</MsalAppProvider>
|
||||
</StrictMode>,
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
import { Button } from "@astryxdesign/core/Button";
|
||||
import { Tab, TabList } from "@astryxdesign/core/TabList";
|
||||
import { useId, type ButtonHTMLAttributes, type ReactNode } from "react";
|
||||
|
||||
export function AuctionAstryxTabs<T extends string>({
|
||||
label,
|
||||
value,
|
||||
onChange,
|
||||
tabs,
|
||||
panelClassName,
|
||||
children,
|
||||
}: {
|
||||
label: string;
|
||||
value: T;
|
||||
onChange: (value: T) => void;
|
||||
tabs: readonly { value: T; label: string; count?: number }[];
|
||||
panelClassName: string;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
const id = useId();
|
||||
|
||||
return (
|
||||
<>
|
||||
<TabList
|
||||
className="auction-astryx-tabs"
|
||||
role="tablist"
|
||||
aria-label={label}
|
||||
size="md"
|
||||
hasDivider
|
||||
value={value}
|
||||
onChange={(next) => {
|
||||
const tab = tabs.find((tab) => tab.value === next);
|
||||
if (tab) onChange(tab.value);
|
||||
}}
|
||||
>
|
||||
{tabs.map((tab) => (
|
||||
<Tab
|
||||
key={tab.value}
|
||||
id={`${id}-${tab.value}-tab`}
|
||||
panelId={`${id}-${tab.value}-panel`}
|
||||
value={tab.value}
|
||||
label={tab.label}
|
||||
endContent={
|
||||
tab.count === undefined ? undefined : (
|
||||
<span className="auction-tab-count">{tab.count}</span>
|
||||
)
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</TabList>
|
||||
{tabs.map((tab) => (
|
||||
<div
|
||||
key={tab.value}
|
||||
role="tabpanel"
|
||||
id={`${id}-${tab.value}-panel`}
|
||||
aria-labelledby={`${id}-${tab.value}-tab`}
|
||||
hidden={tab.value !== value}
|
||||
tabIndex={0}
|
||||
className={tab.value === value ? panelClassName : undefined}
|
||||
>
|
||||
{tab.value === value && children}
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function AuctionAction({
|
||||
variant = "primary",
|
||||
icon,
|
||||
type = "button",
|
||||
disabled,
|
||||
onClick,
|
||||
title,
|
||||
children,
|
||||
}: Pick<
|
||||
ButtonHTMLAttributes<HTMLButtonElement>,
|
||||
"type" | "className" | "disabled" | "onClick" | "title"
|
||||
> & {
|
||||
variant?: "primary" | "secondary" | "destructive";
|
||||
icon?: ReactNode;
|
||||
children: string;
|
||||
}) {
|
||||
return (
|
||||
<Button
|
||||
variant={variant}
|
||||
size="md"
|
||||
type={type}
|
||||
isDisabled={disabled}
|
||||
onClick={onClick}
|
||||
tooltip={title}
|
||||
icon={icon}
|
||||
label={children}
|
||||
width={type === "submit" ? "100%" : undefined}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { LoadingNote, PlainPage } from '../ui';
|
||||
|
||||
export default function AuthCallbackPage() {
|
||||
const navigate = useNavigate();
|
||||
@@ -10,8 +11,8 @@ export default function AuthCallbackPage() {
|
||||
}, [navigate]);
|
||||
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 sm:px-6 py-20 text-center">
|
||||
<span className="text-sm text-base-content/45">로그인 처리 중...</span>
|
||||
</main>
|
||||
<PlainPage>
|
||||
<LoadingNote label="로그인 처리 중" />
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ChevronRight } from 'lucide-react';
|
||||
import { Link, useLocation, useSearchParams } from 'react-router';
|
||||
import {
|
||||
useCommunity,
|
||||
@@ -10,39 +11,48 @@ import type {
|
||||
ApiInternalMatchCard,
|
||||
ApiLeaderHighlight,
|
||||
ApiLeaderboardRow,
|
||||
TeamSide,
|
||||
} from '../api/types';
|
||||
import { DEFAULT_COMMUNITY_ID } from '../config';
|
||||
import { championDisplayName, championIconUrl, profileIconUrl } from '../lib/ddragon';
|
||||
import { sideShortLabel, teamIndexColorClasses, teamIndexLabel } from '../lib/league';
|
||||
import { teamIndexColorClasses, teamIndexLabel } from '../lib/league';
|
||||
import {
|
||||
Btn,
|
||||
Chip,
|
||||
EmptyNote,
|
||||
ErrorNote,
|
||||
LoadingNote,
|
||||
MetaDot,
|
||||
PageBody,
|
||||
PageHero,
|
||||
Panel,
|
||||
PanelHeader,
|
||||
Pill,
|
||||
PlainPage,
|
||||
Skeleton,
|
||||
} from '../ui';
|
||||
|
||||
type Manifest = ReturnType<typeof useDdragonManifest>['data'];
|
||||
|
||||
function formatDateTime(value: string) {
|
||||
return new Intl.DateTimeFormat('ko-KR', {
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
weekday: 'short',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
}).format(new Date(value));
|
||||
}
|
||||
|
||||
function formatDuration(seconds: number) {
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
const rest = seconds % 60;
|
||||
return `${minutes}:${String(rest).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
function sideLabel(side: TeamSide) {
|
||||
return sideShortLabel(side);
|
||||
}
|
||||
|
||||
function sideText(side: TeamSide) {
|
||||
return side === 'blue' ? 'text-blue-400' : 'text-red-400';
|
||||
}
|
||||
|
||||
function ratioClass(value: number) {
|
||||
if (value >= 55) return 'text-blue-400';
|
||||
if (value >= 50) return 'text-amber-400';
|
||||
return 'text-base-content/45';
|
||||
if (value >= 60) return 'text-loss';
|
||||
if (value >= 50) return 'text-win';
|
||||
return 'text-content-muted';
|
||||
}
|
||||
|
||||
function kdaClass(value: number) {
|
||||
if (value >= 5) return 'text-gold';
|
||||
if (value >= 3) return 'text-leaf';
|
||||
return 'text-content-muted';
|
||||
}
|
||||
|
||||
function ChampionChip({
|
||||
@@ -50,143 +60,233 @@ function ChampionChip({
|
||||
manifest,
|
||||
}: {
|
||||
championId: number;
|
||||
manifest: ReturnType<typeof useDdragonManifest>['data'];
|
||||
manifest: Manifest;
|
||||
}) {
|
||||
const icon = championIconUrl(manifest, championId);
|
||||
const name = championDisplayName(manifest, championId) ?? String(championId);
|
||||
return (
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<span className="w-5 h-5 bg-base-content/10 overflow-hidden">
|
||||
{icon ? <img src={icon} alt="" className="w-full h-full object-cover" /> : null}
|
||||
</span>
|
||||
<span>{name}</span>
|
||||
<span
|
||||
className="size-7 overflow-hidden rounded-full bg-sunken-strong"
|
||||
title={name}
|
||||
>
|
||||
{icon ? (
|
||||
<img
|
||||
src={icon}
|
||||
alt={name}
|
||||
className="size-full scale-[1.15] object-cover"
|
||||
loading="lazy"
|
||||
/>
|
||||
) : null}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
function AvatarStack({
|
||||
members,
|
||||
manifest,
|
||||
}: {
|
||||
members: ApiInternalMatchCard['teams'][number]['members'];
|
||||
manifest: Manifest;
|
||||
}) {
|
||||
return (
|
||||
<span className="flex shrink-0 -space-x-1.5">
|
||||
{members.slice(0, 5).map((member) => (
|
||||
<img
|
||||
key={member.userId}
|
||||
src={profileIconUrl(manifest, member.profileIconId)}
|
||||
alt=""
|
||||
title={member.summonerName}
|
||||
className="size-6 rounded-full bg-sunken-strong object-cover ring-2 ring-card"
|
||||
loading="lazy"
|
||||
/>
|
||||
))}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 내전 한 건. 두 팀 내전이면 시리즈 점수를, 여러 팀 대회면 우승 팀과
|
||||
* 규모를 보여 준다. 대회의 첫 시리즈 점수를 대회 점수처럼 보이게 하지 않는다.
|
||||
*/
|
||||
function MatchCard({
|
||||
match,
|
||||
manifest,
|
||||
}: {
|
||||
match: ApiInternalMatchCard;
|
||||
manifest: ReturnType<typeof useDdragonManifest>['data'];
|
||||
manifest: Manifest;
|
||||
}) {
|
||||
const primarySeries = match.seriesResults[0];
|
||||
const isHeadToHead = match.teams.length === 2;
|
||||
const series = isHeadToHead ? match.seriesResults[0] : undefined;
|
||||
const winnerTeam = match.teams.find(
|
||||
(team) => team.teamIndex === match.winnerTeamIndex,
|
||||
);
|
||||
const teamName = (teamIndex: number) =>
|
||||
teamIndexLabel(
|
||||
teamIndex,
|
||||
match.teams.find((team) => team.teamIndex === teamIndex)?.name,
|
||||
);
|
||||
const finishedGames = match.games.filter(
|
||||
(game) => game.winnerTeamIndex !== null,
|
||||
).length;
|
||||
|
||||
return (
|
||||
<li>
|
||||
<Link
|
||||
to={`/communities/${DEFAULT_COMMUNITY_ID}/internal-stats/match/${match.matchId}`}
|
||||
className="block group"
|
||||
className="group grid gap-x-6 gap-y-3 px-4 py-4 transition-colors hover:bg-sunken sm:px-5 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)_20px] lg:items-center"
|
||||
>
|
||||
<article className="border border-base-content/10 bg-base-100 hover:border-primary/25 transition-colors">
|
||||
<div className="p-4 grid lg:grid-cols-[1fr_auto_1fr] gap-4 items-center">
|
||||
<div className="min-w-0">
|
||||
<div className="text-xs text-base-content/35">
|
||||
{formatDateTime(match.scheduledAt)}
|
||||
<div className="flex flex-wrap items-center gap-2 text-xs text-content-subtle">
|
||||
<span className="tabular">{formatDateTime(match.scheduledAt)}</span>
|
||||
{match.status === 'in-progress' && (
|
||||
<Pill tone="accent" dot pulse>
|
||||
진행중
|
||||
</Pill>
|
||||
)}
|
||||
</div>
|
||||
<h3 className="mt-1 text-base font-black text-base-content truncate group-hover:text-primary">
|
||||
<h3 className="mt-1 truncate text-base font-bold text-content group-hover:text-primary">
|
||||
{match.title}
|
||||
</h3>
|
||||
<div className="mt-2 flex flex-wrap gap-1.5">
|
||||
{match.games.map((game) => (
|
||||
<span
|
||||
key={game.gameNumber}
|
||||
className="inline-flex items-center gap-1 border border-base-content/10 px-2 py-1 text-xs text-base-content/45"
|
||||
>
|
||||
{game.gameNumber}경기
|
||||
{game.winnerSide && game.winnerTeamIndex ? (
|
||||
<span className={sideText(game.winnerSide)}>
|
||||
{teamName(game.winnerTeamIndex)} 승 ({sideLabel(game.winnerSide)})
|
||||
<p className="mt-1 flex flex-wrap items-center gap-2 text-[13px] text-content-muted">
|
||||
<span>{match.teams.length}팀</span>
|
||||
<MetaDot />
|
||||
<span className="tabular">
|
||||
{finishedGames === match.gameCount
|
||||
? `${match.gameCount}경기`
|
||||
: `${finishedGames}/${match.gameCount}경기 완료`}
|
||||
</span>
|
||||
) : (
|
||||
'대기'
|
||||
)}
|
||||
<span>{formatDuration(game.gameDuration)}</span>
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="text-center px-8">
|
||||
{primarySeries && (
|
||||
<div className="flex items-center justify-center gap-5">
|
||||
<div className={primarySeries.winnerTeamIndex === primarySeries.teamAIndex ? teamIndexColorClasses(primarySeries.teamAIndex).text : 'text-base-content/30'}>
|
||||
<div className="text-4xl font-black tabular-nums">{primarySeries.teamAWins}</div>
|
||||
<div className="text-xs font-bold uppercase tracking-wider">
|
||||
{teamName(primarySeries.teamAIndex)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-base-content/15 text-xs font-black">VS</div>
|
||||
<div className={primarySeries.winnerTeamIndex === primarySeries.teamBIndex ? teamIndexColorClasses(primarySeries.teamBIndex).text : 'text-base-content/30'}>
|
||||
<div className="text-4xl font-black tabular-nums">{primarySeries.teamBWins}</div>
|
||||
<div className="text-xs font-bold uppercase tracking-wider">
|
||||
{teamName(primarySeries.teamBIndex)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="grid sm:grid-cols-2 gap-2">
|
||||
{match.teams.map((team) => (
|
||||
{series ? (
|
||||
<div className="grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3">
|
||||
{[series.teamAIndex, series.teamBIndex].map((teamIndex, side) => {
|
||||
const team = match.teams.find(
|
||||
(candidate) => candidate.teamIndex === teamIndex,
|
||||
);
|
||||
const won = series.winnerTeamIndex === teamIndex;
|
||||
return (
|
||||
<div
|
||||
key={team.teamIndex}
|
||||
className={`border ${teamIndexColorClasses(team.teamIndex).border} p-2`}
|
||||
key={teamIndex}
|
||||
className={`flex min-w-0 items-center gap-2 ${
|
||||
side === 0
|
||||
? 'order-1 flex-row-reverse text-right'
|
||||
: 'order-3'
|
||||
}`}
|
||||
>
|
||||
<div className={`text-xs font-black uppercase tracking-wider ${teamIndexColorClasses(team.teamIndex).text}`}>
|
||||
{team.name}
|
||||
{team && (
|
||||
<AvatarStack members={team.members} manifest={manifest} />
|
||||
)}
|
||||
<span
|
||||
className={`truncate text-sm ${
|
||||
won
|
||||
? 'font-bold text-content'
|
||||
: 'font-medium text-content-muted'
|
||||
}`}
|
||||
>
|
||||
{teamName(teamIndex)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="mt-2 space-y-1">
|
||||
{team.members.slice(0, 5).map((member) => (
|
||||
<div key={member.userId} className="flex items-center gap-1.5 min-w-0">
|
||||
<span className="w-5 h-5 bg-base-content/10 overflow-hidden shrink-0">
|
||||
<img
|
||||
src={profileIconUrl(manifest, member.profileIconId)}
|
||||
alt=""
|
||||
className="w-full h-full object-cover"
|
||||
loading="lazy"
|
||||
);
|
||||
})}
|
||||
<div className="tabular order-2 flex items-baseline gap-1.5 rounded-field bg-sunken px-3 py-1 text-xl font-extrabold">
|
||||
<span
|
||||
className={
|
||||
series.winnerTeamIndex === series.teamAIndex
|
||||
? 'text-content'
|
||||
: 'text-content-subtle'
|
||||
}
|
||||
>
|
||||
{series.teamAWins}
|
||||
</span>
|
||||
<span className="text-sm text-content-disabled">:</span>
|
||||
<span
|
||||
className={
|
||||
series.winnerTeamIndex === series.teamBIndex
|
||||
? 'text-content'
|
||||
: 'text-content-subtle'
|
||||
}
|
||||
>
|
||||
{series.teamBWins}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-wrap items-center gap-x-4 gap-y-2">
|
||||
{winnerTeam ? (
|
||||
<div className="flex items-center gap-2">
|
||||
<Pill tone="gold">우승</Pill>
|
||||
<AvatarStack members={winnerTeam.members} manifest={manifest} />
|
||||
<span className="text-sm font-bold text-content">
|
||||
{winnerTeam.name}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<span className="text-[13px] text-content-muted">
|
||||
우승 팀 미정
|
||||
</span>
|
||||
)}
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{match.teams
|
||||
.filter((team) => team.teamIndex !== winnerTeam?.teamIndex)
|
||||
.slice(0, 7)
|
||||
.map((team) => (
|
||||
<span
|
||||
key={team.teamIndex}
|
||||
className={`inline-flex h-6 max-w-28 items-center rounded-full border px-2 text-xs font-medium ${teamIndexColorClasses(team.teamIndex).border} ${teamIndexColorClasses(team.teamIndex).text}`}
|
||||
>
|
||||
<span className="truncate">{team.name}</span>
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<ChevronRight
|
||||
className="hidden size-5 text-content-disabled group-hover:text-primary lg:block"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</span>
|
||||
<span className="text-xs truncate text-base-content/65">
|
||||
{member.summonerName}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
function HighlightCard({
|
||||
function HighlightCell({
|
||||
title,
|
||||
highlight,
|
||||
suffix = '',
|
||||
isLoading,
|
||||
}: {
|
||||
title: string;
|
||||
highlight: ApiLeaderHighlight | null | undefined;
|
||||
suffix?: string;
|
||||
isLoading: boolean;
|
||||
}) {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<div className="border border-base-content/10 bg-base-100 p-4">
|
||||
<div className="text-xs font-black uppercase tracking-wider text-base-content/30">
|
||||
{title}
|
||||
<div className="min-w-0 px-4 py-3.5 sm:px-5">
|
||||
<div className="text-xs font-semibold text-content-subtle">{title}</div>
|
||||
{isLoading ? (
|
||||
<Skeleton width={64} height={26} className="mt-1.5" />
|
||||
) : (
|
||||
<div className="tabular mt-1 text-[22px] font-extrabold leading-tight text-content">
|
||||
{highlight ? `${highlight.metric}${suffix}` : '—'}
|
||||
</div>
|
||||
<div className="mt-2 text-xl font-black text-base-content tabular-nums">
|
||||
{highlight ? `${highlight.metric}${suffix}` : '-'}
|
||||
</div>
|
||||
<div className="mt-1 text-xs text-base-content/45">
|
||||
{highlight?.summonerName ?? '기록 없음'}
|
||||
)}
|
||||
{highlight ? (
|
||||
<Link
|
||||
to={`/users/${highlight.userId}/history?queueGroup=internal`}
|
||||
state={{ backTo: `${location.pathname}${location.search}` }}
|
||||
className="mt-0.5 block truncate text-[13px] font-medium text-content-muted hover:text-primary"
|
||||
>
|
||||
{highlight.summonerName}
|
||||
</Link>
|
||||
) : (
|
||||
<div className="mt-0.5 text-[13px] text-content-subtle">
|
||||
{isLoading ? ' ' : '기록 없음'}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -196,73 +296,102 @@ function LeaderboardTable({
|
||||
manifest,
|
||||
}: {
|
||||
rows: ApiLeaderboardRow[];
|
||||
manifest: ReturnType<typeof useDdragonManifest>['data'];
|
||||
manifest: Manifest;
|
||||
}) {
|
||||
const location = useLocation();
|
||||
const historyBackTo = `${location.pathname}${location.search}${location.hash}`;
|
||||
|
||||
return (
|
||||
<div className="border border-base-content/10 bg-base-100 overflow-hidden">
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full text-left min-w-[920px]">
|
||||
<table className="lts-table min-w-[860px]">
|
||||
<thead>
|
||||
<tr className="border-b border-base-content/10 bg-base-200/50 text-xs uppercase tracking-wider text-base-content/35">
|
||||
<th className="px-3 py-2.5">#</th>
|
||||
<th className="px-3 py-2.5">소환사</th>
|
||||
<th className="px-3 py-2.5 text-center">승률</th>
|
||||
<th className="px-3 py-2.5 text-center">게임</th>
|
||||
<th className="px-3 py-2.5 text-center">KDA</th>
|
||||
<th className="px-3 py-2.5 text-center">GPM</th>
|
||||
<th className="px-3 py-2.5 text-center">킬관여</th>
|
||||
<th className="px-3 py-2.5 text-center">분당 CS</th>
|
||||
<th className="px-3 py-2.5">주 챔피언</th>
|
||||
<tr>
|
||||
<th scope="col" className="w-12 !text-center">
|
||||
순위
|
||||
</th>
|
||||
<th scope="col">소환사</th>
|
||||
<th scope="col" className="!text-right">
|
||||
승률
|
||||
</th>
|
||||
<th scope="col" className="!text-right">
|
||||
전적
|
||||
</th>
|
||||
<th scope="col" className="!text-right">
|
||||
KDA
|
||||
</th>
|
||||
<th scope="col" className="!text-right">
|
||||
GPM
|
||||
</th>
|
||||
<th scope="col" className="!text-right">
|
||||
킬관여
|
||||
</th>
|
||||
<th scope="col" className="!text-right">
|
||||
분당 CS
|
||||
</th>
|
||||
<th scope="col">주 챔피언</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{rows.map((row, index) => (
|
||||
<tr key={row.userId} className="border-b border-base-content/5 last:border-b-0">
|
||||
<td className="px-3 py-2.5 text-xs text-base-content/30">
|
||||
<tr key={row.userId} className="transition-colors hover:bg-sunken">
|
||||
<td className="tabular text-center">
|
||||
{index < 3 ? (
|
||||
<span
|
||||
className={`inline-grid size-6 place-items-center rounded-full text-xs font-extrabold ${
|
||||
index === 0
|
||||
? 'bg-gold text-accent-content'
|
||||
: 'bg-sunken-strong text-content-muted'
|
||||
}`}
|
||||
>
|
||||
{index + 1}
|
||||
</span>
|
||||
) : (
|
||||
<span className="text-[13px] text-content-subtle">
|
||||
{index + 1}
|
||||
</span>
|
||||
)}
|
||||
</td>
|
||||
<td className="px-3 py-2.5">
|
||||
<td>
|
||||
<Link
|
||||
to={`/users/${row.userId}/history?queueGroup=internal`}
|
||||
state={{ backTo: historyBackTo }}
|
||||
className="flex items-center gap-2 group"
|
||||
className="group flex items-center gap-2.5"
|
||||
>
|
||||
<span className="w-7 h-7 bg-base-content/10 overflow-hidden">
|
||||
<img
|
||||
src={profileIconUrl(manifest, row.profileIconId)}
|
||||
alt=""
|
||||
className="w-full h-full object-cover"
|
||||
className="size-8 rounded-full bg-sunken-strong object-cover"
|
||||
loading="lazy"
|
||||
/>
|
||||
</span>
|
||||
<span className="font-bold text-sm group-hover:text-primary">
|
||||
<span className="font-semibold text-content group-hover:text-primary">
|
||||
{row.summonerName}
|
||||
</span>
|
||||
</Link>
|
||||
</td>
|
||||
<td className={`px-3 py-2.5 text-center text-sm font-black ${ratioClass(row.winRate)}`}>
|
||||
<td
|
||||
className={`tabular text-right font-bold ${ratioClass(row.winRate)}`}
|
||||
>
|
||||
{row.winRate}%
|
||||
</td>
|
||||
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
|
||||
{row.games}
|
||||
<td className="tabular whitespace-nowrap text-right text-[13px] text-content-muted">
|
||||
{row.games}전 {row.wins}승 {row.losses}패
|
||||
</td>
|
||||
<td className="px-3 py-2.5 text-center text-xs font-bold tabular-nums">
|
||||
<td
|
||||
className={`tabular text-right font-semibold ${kdaClass(row.kda)}`}
|
||||
>
|
||||
{row.kda}
|
||||
</td>
|
||||
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
|
||||
<td className="tabular text-right text-[13px]">
|
||||
{row.avgGoldPerMin}
|
||||
</td>
|
||||
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
|
||||
<td className="tabular text-right text-[13px]">
|
||||
{row.avgKillParticipation}%
|
||||
</td>
|
||||
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
|
||||
<td className="tabular text-right text-[13px]">
|
||||
{row.avgCsPerMin}
|
||||
</td>
|
||||
<td className="px-3 py-2.5">
|
||||
<div className="flex flex-wrap gap-2 text-xs text-base-content/55">
|
||||
<td>
|
||||
<div className="flex gap-1">
|
||||
{row.topChampions.map((champion) => (
|
||||
<ChampionChip
|
||||
key={champion.championId}
|
||||
@@ -274,22 +403,37 @@ function LeaderboardTable({
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
{rows.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={9} className="py-10 text-center text-sm text-base-content/35">
|
||||
아직 집계할 내전 기록이 없습니다.
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function SideWinRate({ blue, red }: { blue: number; red: number }) {
|
||||
const total = blue + red;
|
||||
const blueShare = total > 0 ? (blue / total) * 100 : 50;
|
||||
|
||||
return (
|
||||
<div className="w-full max-w-64 sm:w-64">
|
||||
<div className="tabular flex justify-between text-xs font-semibold">
|
||||
<span className="text-[#8fb6ff]">블루 {blue}%</span>
|
||||
<span className="text-[#ff99a5]">레드 {red}%</span>
|
||||
</div>
|
||||
<div
|
||||
className="mt-1.5 flex h-1.5 gap-0.5 overflow-hidden rounded-full"
|
||||
role="img"
|
||||
aria-label={`진영 승률 블루 ${blue}%, 레드 ${red}%`}
|
||||
>
|
||||
<span className="bg-win" style={{ width: `${blueShare}%` }} />
|
||||
<span className="flex-1 bg-loss" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function CommunityInternalStatsPage() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const view = searchParams.get('view') === 'ranking' ? 'ranking' : 'matches';
|
||||
const championIdParam = Number(searchParams.get('championId'));
|
||||
const championId =
|
||||
Number.isFinite(championIdParam) && championIdParam > 0
|
||||
@@ -308,99 +452,191 @@ export default function CommunityInternalStatsPage() {
|
||||
const matches = matchesQuery.data?.pages.flatMap((page) => page.matches) ?? [];
|
||||
const season =
|
||||
leaderboardQuery.data?.season ?? matchesQuery.data?.pages[0]?.season ?? null;
|
||||
const insights = insightsQuery.data;
|
||||
const leaderboardRows = leaderboardQuery.data?.rows ?? [];
|
||||
|
||||
if (!DEFAULT_COMMUNITY_ID) {
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 py-20 text-center text-sm text-amber-600">
|
||||
`VITE_DEFAULT_COMMUNITY_ID` 설정이 필요합니다.
|
||||
</main>
|
||||
<PlainPage className="py-16">
|
||||
<ErrorNote
|
||||
title="커뮤니티가 설정되지 않았습니다"
|
||||
description="VITE_DEFAULT_COMMUNITY_ID 설정이 필요합니다."
|
||||
/>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
function setView(next: 'matches' | 'ranking') {
|
||||
const params = new URLSearchParams(searchParams);
|
||||
if (next === 'matches') params.delete('view');
|
||||
else params.set('view', next);
|
||||
setSearchParams(params, { preventScrollReset: true });
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 sm:px-6 py-6">
|
||||
<Link to="/" className="text-xs text-base-content/40 hover:text-base-content">
|
||||
← 홈으로
|
||||
</Link>
|
||||
|
||||
<section className="mt-5 mb-6 border border-base-content/10 bg-base-100 p-5">
|
||||
<div className="flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4">
|
||||
<div>
|
||||
<p className="text-xs font-black uppercase tracking-[0.24em] text-primary">
|
||||
Community Records
|
||||
</p>
|
||||
<h1 className="mt-2 text-3xl font-black text-base-content">
|
||||
{communityQuery.data?.name ?? '커뮤니티'} 내전 전적
|
||||
</h1>
|
||||
<p className="mt-2 text-sm text-base-content/45">
|
||||
토너먼트 코드로 수집된 결과를 기준으로 매치, 선수 순위, 팀 인사이트를 보여줍니다.
|
||||
</p>
|
||||
</div>
|
||||
<div className="border border-base-content/10 px-4 py-3 text-sm text-base-content/55">
|
||||
<div className="text-xs uppercase tracking-wider text-base-content/30">
|
||||
시즌
|
||||
</div>
|
||||
<div className="mt-1 font-bold">{season?.label ?? '현재 시즌'}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="grid sm:grid-cols-2 lg:grid-cols-5 gap-3 mb-6">
|
||||
<HighlightCard title="최고 KDA" highlight={insightsQuery.data?.topKda} />
|
||||
<HighlightCard title="누적 킬 1위" highlight={insightsQuery.data?.mostKills} />
|
||||
<HighlightCard title="단일 경기 GPM" highlight={insightsQuery.data?.topTeamGpm} />
|
||||
<HighlightCard title="킬 관여율" highlight={insightsQuery.data?.topKillParticipation} suffix="%" />
|
||||
<HighlightCard title="분당 CS" highlight={insightsQuery.data?.bestFarm} />
|
||||
</section>
|
||||
|
||||
<section className="mb-8">
|
||||
<div className="flex items-center justify-between gap-3 mb-3">
|
||||
<h2 className="text-sm font-black text-base-content">최근 내전</h2>
|
||||
<div className="text-xs text-base-content/35">
|
||||
블루 승률 {insightsQuery.data?.sideWinRate.blue ?? 0}% · 레드 승률{' '}
|
||||
{insightsQuery.data?.sideWinRate.red ?? 0}%
|
||||
</div>
|
||||
</div>
|
||||
{matchesQuery.isLoading ? (
|
||||
<div className="border border-base-content/10 bg-base-100 px-4 py-12 text-center text-sm text-base-content/35">
|
||||
내전 기록을 불러오는 중...
|
||||
<>
|
||||
<PageHero
|
||||
eyebrow={season?.label ?? '현재 시즌'}
|
||||
title={`${communityQuery.data?.name ?? '커뮤니티'} 내전 전적`}
|
||||
meta="토너먼트 코드로 수집한 내전 결과를 집계합니다."
|
||||
actions={
|
||||
insights ? (
|
||||
<SideWinRate
|
||||
blue={insights.sideWinRate.blue}
|
||||
red={insights.sideWinRate.red}
|
||||
/>
|
||||
) : undefined
|
||||
}
|
||||
/>
|
||||
<PageBody className="space-y-5">
|
||||
<Panel aria-busy={insightsQuery.isLoading}>
|
||||
<PanelHeader title="시즌 기록" />
|
||||
{insightsQuery.error ? (
|
||||
<div className="p-4">
|
||||
<ErrorNote
|
||||
title="시즌 기록을 불러오지 못했습니다"
|
||||
action={
|
||||
<Btn size="sm" onClick={() => void insightsQuery.refetch()}>
|
||||
다시 시도
|
||||
</Btn>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
{matches.map((match) => (
|
||||
<MatchCard key={match.matchId} match={match} manifest={ddragon} />
|
||||
))}
|
||||
{matches.length === 0 && (
|
||||
<div className="border border-base-content/10 bg-base-100 px-4 py-12 text-center text-sm text-base-content/35">
|
||||
아직 수집된 내전 결과가 없습니다.
|
||||
<div className="grid grid-cols-2 divide-line max-lg:[&>*:nth-child(even)]:border-l max-lg:[&>*:nth-child(n+3)]:border-t lg:grid-cols-5 lg:divide-x">
|
||||
<HighlightCell
|
||||
title="최고 KDA"
|
||||
highlight={insights?.topKda}
|
||||
isLoading={insightsQuery.isLoading}
|
||||
/>
|
||||
<HighlightCell
|
||||
title="누적 킬"
|
||||
highlight={insights?.mostKills}
|
||||
isLoading={insightsQuery.isLoading}
|
||||
/>
|
||||
<HighlightCell
|
||||
title="단일 경기 GPM"
|
||||
highlight={insights?.topTeamGpm}
|
||||
isLoading={insightsQuery.isLoading}
|
||||
/>
|
||||
<HighlightCell
|
||||
title="킬 관여율"
|
||||
highlight={insights?.topKillParticipation}
|
||||
suffix="%"
|
||||
isLoading={insightsQuery.isLoading}
|
||||
/>
|
||||
<HighlightCell
|
||||
title="분당 CS"
|
||||
highlight={insights?.bestFarm}
|
||||
isLoading={insightsQuery.isLoading}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{matchesQuery.hasNextPage && (
|
||||
<button
|
||||
type="button"
|
||||
className="mt-3 w-full border border-base-content/15 bg-base-100 py-3 text-sm font-bold text-base-content/60 hover:text-primary hover:border-primary/30 disabled:opacity-40"
|
||||
disabled={matchesQuery.isFetchingNextPage}
|
||||
onClick={() => matchesQuery.fetchNextPage()}
|
||||
>
|
||||
{matchesQuery.isFetchingNextPage ? '불러오는 중...' : '+ 더 보기'}
|
||||
</button>
|
||||
)}
|
||||
</section>
|
||||
</Panel>
|
||||
|
||||
<section>
|
||||
<div className="flex items-center justify-between gap-3 mb-3">
|
||||
<h2 className="text-sm font-black text-base-content">선수 순위</h2>
|
||||
<div className="text-xs text-base-content/35">
|
||||
포지션은 Riot Match의 라인 정보를 기준으로 합니다.
|
||||
<div
|
||||
className="flex items-center gap-1.5"
|
||||
role="tablist"
|
||||
aria-label="전적 보기"
|
||||
>
|
||||
<Chip
|
||||
role="tab"
|
||||
aria-selected={view === 'matches'}
|
||||
selected={view === 'matches'}
|
||||
onClick={() => setView('matches')}
|
||||
>
|
||||
최근 내전
|
||||
</Chip>
|
||||
<Chip
|
||||
role="tab"
|
||||
aria-selected={view === 'ranking'}
|
||||
selected={view === 'ranking'}
|
||||
onClick={() => setView('ranking')}
|
||||
>
|
||||
선수 순위
|
||||
{leaderboardRows.length > 0 && (
|
||||
<span className="tabular opacity-70">
|
||||
{leaderboardRows.length}
|
||||
</span>
|
||||
)}
|
||||
</Chip>
|
||||
</div>
|
||||
|
||||
{view === 'matches' ? (
|
||||
<Panel>
|
||||
{matchesQuery.isLoading ? (
|
||||
<LoadingNote label="내전 기록을 불러오는 중" />
|
||||
) : matchesQuery.error ? (
|
||||
<div className="p-4">
|
||||
<ErrorNote
|
||||
title="내전 기록을 불러오지 못했습니다"
|
||||
action={
|
||||
<Btn size="sm" onClick={() => void matchesQuery.refetch()}>
|
||||
다시 시도
|
||||
</Btn>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<LeaderboardTable
|
||||
rows={leaderboardQuery.data?.rows ?? []}
|
||||
) : matches.length === 0 ? (
|
||||
<EmptyNote
|
||||
title="아직 수집된 내전 결과가 없습니다"
|
||||
description="내전이 끝나고 결과가 수집되면 이곳에 표시됩니다."
|
||||
/>
|
||||
) : (
|
||||
<ul className="divide-y divide-line">
|
||||
{matches.map((match) => (
|
||||
<MatchCard
|
||||
key={match.matchId}
|
||||
match={match}
|
||||
manifest={ddragon}
|
||||
/>
|
||||
</section>
|
||||
</main>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
{matchesQuery.hasNextPage && (
|
||||
<div className="border-t border-line p-3">
|
||||
<Btn
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
disabled={matchesQuery.isFetchingNextPage}
|
||||
loading={matchesQuery.isFetchingNextPage}
|
||||
onClick={() => void matchesQuery.fetchNextPage()}
|
||||
>
|
||||
더 보기
|
||||
</Btn>
|
||||
</div>
|
||||
)}
|
||||
</Panel>
|
||||
) : (
|
||||
<Panel>
|
||||
<PanelHeader
|
||||
title="선수 순위"
|
||||
description="승률 순. 포지션은 Riot 매치의 라인 정보를 기준으로 합니다."
|
||||
/>
|
||||
{leaderboardQuery.isLoading ? (
|
||||
<LoadingNote label="순위를 불러오는 중" />
|
||||
) : leaderboardQuery.error ? (
|
||||
<div className="p-4">
|
||||
<ErrorNote
|
||||
title="순위를 불러오지 못했습니다"
|
||||
action={
|
||||
<Btn
|
||||
size="sm"
|
||||
onClick={() => void leaderboardQuery.refetch()}
|
||||
>
|
||||
다시 시도
|
||||
</Btn>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
) : leaderboardRows.length === 0 ? (
|
||||
<EmptyNote title="아직 집계할 내전 기록이 없습니다" />
|
||||
) : (
|
||||
<LeaderboardTable rows={leaderboardRows} manifest={ddragon} />
|
||||
)}
|
||||
</Panel>
|
||||
)}
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -8,13 +8,23 @@ import {
|
||||
} from "../lib/ddragon";
|
||||
import {
|
||||
sideShortLabel,
|
||||
teamIndexColorClasses,
|
||||
teamIndexLabel,
|
||||
} from "../lib/league";
|
||||
import { internalMatchGamePath } from "../lib/internal-match-routes";
|
||||
import { LANE_LABELS } from "../lib/riot-history";
|
||||
import { ItemIcon } from "../components/ItemTooltip";
|
||||
|
||||
import {
|
||||
Btn,
|
||||
EmptyNote,
|
||||
LoadingNote,
|
||||
MetaDot,
|
||||
PageBody,
|
||||
PageHero,
|
||||
Panel,
|
||||
PlainPage,
|
||||
} from "../ui";
|
||||
|
||||
function formatDateTime(value: string | number) {
|
||||
return new Intl.DateTimeFormat("ko-KR", {
|
||||
month: "long",
|
||||
@@ -36,8 +46,8 @@ function sideLabel(side: TeamSide) {
|
||||
|
||||
function sideClass(side: TeamSide) {
|
||||
return side === "blue"
|
||||
? "text-blue-400 border-blue-500/20"
|
||||
: "text-red-400 border-red-500/20";
|
||||
? "text-win border-win-line"
|
||||
: "text-loss border-loss-line";
|
||||
}
|
||||
|
||||
function ChampionCell({
|
||||
@@ -101,8 +111,8 @@ function GamePanel({
|
||||
const historyBackTo = `${location.pathname}${location.search}${location.hash}`;
|
||||
|
||||
return (
|
||||
<section className="border border-base-content/10 bg-base-100 overflow-hidden">
|
||||
<div className="px-4 py-3 border-b border-base-content/10 bg-base-200/40 flex flex-wrap items-center justify-between gap-3">
|
||||
<section className="lts-panel overflow-hidden">
|
||||
<div className="flex flex-wrap items-center justify-between gap-3 border-b border-line px-4 py-3 sm:px-5">
|
||||
<div>
|
||||
<h2 className="text-sm font-black text-base-content">
|
||||
{game.gameNumber}경기
|
||||
@@ -117,15 +127,19 @@ function GamePanel({
|
||||
<Link
|
||||
to={internalMatchGamePath(communityId, matchId, game.gameNumber)}
|
||||
state={{ backTo: historyBackTo }}
|
||||
className="border border-primary/20 px-2 py-1 text-xs font-black text-primary transition-colors hover:bg-primary/8"
|
||||
className="inline-flex h-7 items-center rounded-full bg-primary-tint px-3 text-xs font-bold text-primary transition-colors hover:brightness-95"
|
||||
>
|
||||
상세 분석
|
||||
</Link>
|
||||
{game.teams.map((team) => (
|
||||
<span
|
||||
key={team.side}
|
||||
className={`border px-2 py-1 text-xs font-black ${sideClass(team.side)} ${
|
||||
team.win ? "bg-base-content/5" : "opacity-40"
|
||||
className={`inline-flex h-7 items-center rounded-full px-3 text-xs font-bold ${
|
||||
team.win
|
||||
? team.side === "blue"
|
||||
? "bg-win-tint text-win"
|
||||
: "bg-loss-tint text-loss"
|
||||
: "bg-sunken text-content-subtle"
|
||||
}`}
|
||||
>
|
||||
{teamIndexLabel(team.teamIndex)} ({sideLabel(team.side)}){" "}
|
||||
@@ -197,7 +211,7 @@ function GamePanel({
|
||||
<td className="px-3 py-2 text-center text-sm font-black tabular-nums">
|
||||
{participant.kills}
|
||||
<span className="text-base-content/25"> / </span>
|
||||
<span className="text-red-400">{participant.deaths}</span>
|
||||
<span className="text-loss">{participant.deaths}</span>
|
||||
<span className="text-base-content/25"> / </span>
|
||||
{participant.assists}
|
||||
</td>
|
||||
@@ -240,27 +254,29 @@ export default function InternalMatchDetailPage() {
|
||||
|
||||
if (detailQuery.isLoading) {
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 py-20 text-center text-sm text-base-content/40">
|
||||
내전 상세 기록을 불러오는 중...
|
||||
</main>
|
||||
<PlainPage>
|
||||
<LoadingNote label="내전 기록을 불러오는 중" />
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
if (detailQuery.error || !detail) {
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">내전 기록을 찾을 수 없습니다</h1>
|
||||
<Link
|
||||
to={`/communities/${communityId}/internal-stats`}
|
||||
className="btn btn-ghost btn-sm mt-4"
|
||||
>
|
||||
내전 전적으로 돌아가기
|
||||
</Link>
|
||||
</main>
|
||||
<PlainPage>
|
||||
<EmptyNote
|
||||
title="내전 기록을 찾을 수 없습니다"
|
||||
action={
|
||||
<Btn to={`/communities/${communityId}/internal-stats`}>
|
||||
내전 전적으로
|
||||
</Btn>
|
||||
}
|
||||
/>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
const primarySeries = detail.match.seriesResults[0];
|
||||
const isHeadToHead = detail.match.teams.length === 2;
|
||||
const primarySeries = isHeadToHead ? detail.match.seriesResults[0] : undefined;
|
||||
const teamName = (teamIndex: number) =>
|
||||
teamIndexLabel(
|
||||
teamIndex,
|
||||
@@ -268,62 +284,74 @@ export default function InternalMatchDetailPage() {
|
||||
);
|
||||
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 sm:px-6 py-6">
|
||||
<Link
|
||||
to={`/communities/${communityId}/internal-stats`}
|
||||
className="text-xs text-base-content/40 hover:text-base-content"
|
||||
>
|
||||
← 내전 전적
|
||||
</Link>
|
||||
|
||||
<section className="mt-5 mb-6 border border-base-content/10 bg-base-100 p-5">
|
||||
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
<div>
|
||||
<h1 className="text-2xl font-black text-base-content">
|
||||
{detail.match.title}
|
||||
</h1>
|
||||
<p className="mt-2 text-sm text-base-content/45">
|
||||
{formatDateTime(detail.match.scheduledAt)} ·{" "}
|
||||
{detail.match.gameCount}전제
|
||||
</p>
|
||||
</div>
|
||||
{primarySeries && (
|
||||
<div className="flex items-center gap-6">
|
||||
<>
|
||||
<PageHero
|
||||
width="xl"
|
||||
crumbs={[
|
||||
{ label: "전적", to: `/communities/${communityId}/internal-stats` },
|
||||
{ label: detail.match.title },
|
||||
]}
|
||||
title={detail.match.title}
|
||||
meta={
|
||||
<>
|
||||
<span>{formatDateTime(detail.match.scheduledAt)}</span>
|
||||
<MetaDot />
|
||||
<span>{detail.match.teams.length}팀</span>
|
||||
<MetaDot />
|
||||
<span>{detail.match.gameCount}경기</span>
|
||||
</>
|
||||
}
|
||||
actions={
|
||||
primarySeries ? (
|
||||
<div
|
||||
className="flex items-center gap-4"
|
||||
aria-label={`시리즈 결과 ${teamName(primarySeries.teamAIndex)} ${primarySeries.teamAWins} 대 ${primarySeries.teamBWins} ${teamName(primarySeries.teamBIndex)}`}
|
||||
>
|
||||
<span
|
||||
className={`max-w-32 truncate text-sm font-bold ${primarySeries.winnerTeamIndex === primarySeries.teamAIndex ? "text-on-ink" : "text-on-ink-muted"}`}
|
||||
>
|
||||
{teamName(primarySeries.teamAIndex)}
|
||||
</span>
|
||||
<span className="tabular flex items-baseline gap-2 text-4xl font-extrabold">
|
||||
<span
|
||||
className={
|
||||
primarySeries.winnerTeamIndex === primarySeries.teamAIndex
|
||||
? teamIndexColorClasses(primarySeries.teamAIndex).text
|
||||
: "text-base-content/30"
|
||||
? "text-brand-coral"
|
||||
: "text-on-ink-muted"
|
||||
}
|
||||
>
|
||||
<div className="text-4xl font-black tabular-nums">
|
||||
{primarySeries.teamAWins}
|
||||
</div>
|
||||
<div className="text-xs font-bold uppercase tracking-wider">
|
||||
{teamName(primarySeries.teamAIndex)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-base-content/15 text-xs font-black">VS</div>
|
||||
<div
|
||||
</span>
|
||||
<span className="text-xl text-on-ink-muted">:</span>
|
||||
<span
|
||||
className={
|
||||
primarySeries.winnerTeamIndex === primarySeries.teamBIndex
|
||||
? teamIndexColorClasses(primarySeries.teamBIndex).text
|
||||
: "text-base-content/30"
|
||||
? "text-brand-coral"
|
||||
: "text-on-ink-muted"
|
||||
}
|
||||
>
|
||||
<div className="text-4xl font-black tabular-nums">
|
||||
{primarySeries.teamBWins}
|
||||
</div>
|
||||
<div className="text-xs font-bold uppercase tracking-wider">
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
className={`max-w-32 truncate text-sm font-bold ${primarySeries.winnerTeamIndex === primarySeries.teamBIndex ? "text-on-ink" : "text-on-ink-muted"}`}
|
||||
>
|
||||
{teamName(primarySeries.teamBIndex)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<Btn to={`/match/${detail.match.matchId}`} variant="primary">
|
||||
대진표 보기
|
||||
</Btn>
|
||||
)
|
||||
}
|
||||
/>
|
||||
<PageBody width="xl" className="space-y-4">
|
||||
{detail.games.length === 0 && (
|
||||
<Panel>
|
||||
<EmptyNote title="수집된 경기 기록이 없습니다" />
|
||||
</Panel>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div className="space-y-4">
|
||||
{detail.games.map((game) => (
|
||||
<GamePanel
|
||||
key={game.riotMatchId}
|
||||
@@ -333,7 +361,7 @@ export default function InternalMatchDetailPage() {
|
||||
manifest={ddragon}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</main>
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,47 +1,54 @@
|
||||
import { useMsal } from "@azure/msal-react";
|
||||
import { KeyRound } from "lucide-react";
|
||||
import {
|
||||
isMsalConfigured,
|
||||
MSAL_API_SCOPE,
|
||||
msalInstance,
|
||||
} from "../lib/auth/msal.config";
|
||||
import { Button, ErrorNote, PlainPage } from "../ui";
|
||||
|
||||
function LoginButton() {
|
||||
const { instance } = useMsal();
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm px-5"
|
||||
<Button
|
||||
label="Entra ID로 로그인"
|
||||
variant="primary"
|
||||
size="lg"
|
||||
width="100%"
|
||||
onClick={() =>
|
||||
void instance.loginRedirect({
|
||||
scopes: [MSAL_API_SCOPE],
|
||||
prompt: "select_account",
|
||||
})
|
||||
}
|
||||
>
|
||||
Entra ID 로 로그인
|
||||
</button>
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default function LoginPage() {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 sm:px-6 py-20">
|
||||
<div className="max-w-md border border-base-content/10 bg-base-100 p-6 shadow-sm">
|
||||
<h1 className="text-xl font-bold tracking-tight">로그인</h1>
|
||||
<p className="mt-2 text-sm text-base-content/50">
|
||||
Entra ID 계정으로 LOLYMPUS 정보를 불러옵니다.
|
||||
<PlainPage width="md" className="py-16 sm:py-24">
|
||||
<div className="lts-panel mx-auto max-w-sm p-6 sm:p-8">
|
||||
<span className="grid size-11 place-items-center rounded-full bg-primary-tint text-primary">
|
||||
<KeyRound className="size-5" aria-hidden="true" />
|
||||
</span>
|
||||
<h1 className="mt-4 text-xl font-extrabold text-content">로그인</h1>
|
||||
<p className="mt-1.5 text-sm leading-relaxed text-content-muted">
|
||||
내전 참가 신청, 팀장 경매, 운영 기능은 로그인 후 사용할 수 있습니다.
|
||||
전적과 대진은 로그인 없이 볼 수 있습니다.
|
||||
</p>
|
||||
<div className="mt-5">
|
||||
<div className="mt-6">
|
||||
{isMsalConfigured && msalInstance ? (
|
||||
<LoginButton />
|
||||
) : (
|
||||
<div className="text-sm text-amber-600">
|
||||
MSAL 환경변수 설정이 필요합니다.
|
||||
</div>
|
||||
<ErrorNote
|
||||
title="로그인을 사용할 수 없습니다"
|
||||
description="MSAL 환경변수 설정이 필요합니다."
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
@@ -4,7 +4,24 @@ import type {
|
||||
MatchDetailResponse,
|
||||
MatchParticipantView,
|
||||
} from "@lolympus/contracts";
|
||||
import { ChevronLeft, Search, X } from "lucide-react";
|
||||
import {
|
||||
CalendarDays,
|
||||
Map as MapIcon,
|
||||
Search,
|
||||
Users,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import {
|
||||
EmptyNote,
|
||||
ErrorNote,
|
||||
LoadingNote,
|
||||
MetaDot,
|
||||
PageBody,
|
||||
PageHero,
|
||||
Pill,
|
||||
PlainPage,
|
||||
type PillTone,
|
||||
} from "../ui";
|
||||
import {
|
||||
Link,
|
||||
useLocation,
|
||||
@@ -35,7 +52,6 @@ import { RankBadge } from "../components/RankBadge";
|
||||
import { CompetitionAdminControls } from "../components/competition/CompetitionAdminControls";
|
||||
import { CompetitionResults } from "../components/competition/CompetitionResults";
|
||||
import { MatchDetailTabBar } from "../components/competition/MatchDetailTabBar";
|
||||
import { MATCH_PAGE_MAX_WIDTH_CLASS } from "../components/competition/competition-display-layout";
|
||||
import {
|
||||
createMatchDetailTabSearchParams,
|
||||
createMatchDetailTabs,
|
||||
@@ -61,6 +77,7 @@ import type {
|
||||
Position,
|
||||
} from "../api/types";
|
||||
|
||||
import { Btn } from "../ui/Btn";
|
||||
type CaptainSelectionSlot = {
|
||||
teamIndex: number;
|
||||
};
|
||||
@@ -295,28 +312,20 @@ function TierCell({ participant }: { participant: ParticipantView }) {
|
||||
);
|
||||
}
|
||||
|
||||
function statusBadge(status: MatchDetailView["status"]) {
|
||||
function statusBadge(status: MatchDetailView["status"]): {
|
||||
label: string;
|
||||
tone: PillTone;
|
||||
live?: boolean;
|
||||
} {
|
||||
switch (status) {
|
||||
case "recruiting":
|
||||
return {
|
||||
label: "모집 중",
|
||||
cls: "bg-success/15 text-success border-success/20",
|
||||
};
|
||||
return { label: "모집 중", tone: "live", live: true };
|
||||
case "team-built":
|
||||
return {
|
||||
label: "팀빌딩 완료",
|
||||
cls: "bg-warning/15 text-warning border-warning/20",
|
||||
};
|
||||
return { label: "팀빌딩 완료", tone: "gold" };
|
||||
case "in-progress":
|
||||
return {
|
||||
label: "진행 중",
|
||||
cls: "bg-info/15 text-info border-info/20",
|
||||
};
|
||||
return { label: "진행 중", tone: "accent", live: true };
|
||||
case "finished":
|
||||
return {
|
||||
label: "종료",
|
||||
cls: "bg-base-content/8 text-base-content/40 border-base-content/10",
|
||||
};
|
||||
return { label: "종료", tone: "ink" };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,14 +774,13 @@ function AdminAddParticipantModal({
|
||||
카카오 닉네임 또는 Riot ID로 커뮤니티 유저를 찾습니다.
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-ghost btn-xs h-8 min-h-8 w-8 p-0"
|
||||
<Btn
|
||||
variant="ghost" size="sm"
|
||||
aria-label="참여자 추가 닫기"
|
||||
onClick={onClose}
|
||||
>
|
||||
<X size={15} aria-hidden="true" />
|
||||
</button>
|
||||
</Btn>
|
||||
</div>
|
||||
|
||||
<div className="space-y-3 px-4 py-4">
|
||||
@@ -795,7 +803,7 @@ function AdminAddParticipantModal({
|
||||
}}
|
||||
aria-label="참여자 검색"
|
||||
placeholder="카카오 닉네임 또는 Riot ID (GameName#TagLine)"
|
||||
className="min-w-0 flex-1 bg-transparent text-sm text-base-content outline-none placeholder:text-base-content/25"
|
||||
className="lts-input min-w-0 flex-1 outline-none"
|
||||
/>
|
||||
</span>
|
||||
</label>
|
||||
@@ -883,7 +891,7 @@ function AdminAddParticipantModal({
|
||||
[candidate.userId]: event.target.value,
|
||||
}))
|
||||
}
|
||||
className="h-8 min-w-0 flex-1 border border-base-content/10 bg-base-100 px-2 text-xs text-base-content focus:border-primary/30 focus:outline-none"
|
||||
className="lts-select min-w-0 flex-1"
|
||||
>
|
||||
{candidate.riotAccounts.map((riotAccount) => (
|
||||
<option
|
||||
@@ -919,7 +927,7 @@ function AdminAddParticipantModal({
|
||||
event.target.value as Position,
|
||||
)
|
||||
}
|
||||
className="mt-1 h-8 w-full border border-base-content/10 bg-base-100 px-2 text-xs text-base-content focus:border-primary/30 focus:outline-none"
|
||||
className="lts-select mt-1 w-full"
|
||||
>
|
||||
{POSITION_ORDER.map((position) => (
|
||||
<option key={position} value={position}>
|
||||
@@ -939,7 +947,7 @@ function AdminAddParticipantModal({
|
||||
event.target.value as Position,
|
||||
)
|
||||
}
|
||||
className="mt-1 h-8 w-full border border-base-content/10 bg-base-100 px-2 text-xs text-base-content focus:border-primary/30 focus:outline-none"
|
||||
className="lts-select mt-1 w-full"
|
||||
>
|
||||
{POSITION_ORDER.map((position) => (
|
||||
<option key={position} value={position}>
|
||||
@@ -950,8 +958,7 @@ function AdminAddParticipantModal({
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
<Btn
|
||||
disabled={Boolean(disabledReason) || isAdding}
|
||||
onClick={() =>
|
||||
onAddParticipant({
|
||||
@@ -964,10 +971,10 @@ function AdminAddParticipantModal({
|
||||
),
|
||||
})
|
||||
}
|
||||
className="btn btn-primary btn-sm h-9 min-h-9 w-full text-xs disabled:opacity-40"
|
||||
variant="primary" className="w-full"
|
||||
>
|
||||
{isAdding ? "추가 중..." : "추가"}
|
||||
</button>
|
||||
</Btn>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
@@ -1071,23 +1078,21 @@ function ParticipantTable({
|
||||
참가자 ({participants.length}/{maxParticipants})
|
||||
</h3>
|
||||
<div className="flex flex-wrap items-center justify-end gap-2">
|
||||
<button
|
||||
type="button"
|
||||
<Btn
|
||||
onClick={onJoin}
|
||||
disabled={!canJoin || joined || isJoining}
|
||||
className="btn btn-primary btn-xs px-4 text-xs font-semibold disabled:opacity-40"
|
||||
variant="primary" size="sm"
|
||||
>
|
||||
{joined ? "참가 완료" : isJoining ? "신청 중..." : "참가 신청"}
|
||||
</button>
|
||||
</Btn>
|
||||
{canManage && (
|
||||
<button
|
||||
type="button"
|
||||
<Btn
|
||||
onClick={onOpenAddParticipant}
|
||||
disabled={participants.length >= maxParticipants}
|
||||
className="btn btn-outline btn-xs px-3 text-xs font-semibold disabled:opacity-40"
|
||||
variant="secondary" size="sm"
|
||||
>
|
||||
참여자 추가
|
||||
</button>
|
||||
</Btn>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1133,7 +1138,7 @@ function ParticipantTable({
|
||||
})}
|
||||
</div>
|
||||
<select
|
||||
className="h-8 w-32 shrink-0 border border-base-content/10 bg-base-100 px-2 text-xs text-base-content focus:border-primary/30 focus:outline-none"
|
||||
className="lts-select w-32 shrink-0"
|
||||
value={tierFilter}
|
||||
onChange={(event) => setTierFilter(event.target.value)}
|
||||
>
|
||||
@@ -1147,16 +1152,15 @@ function ParticipantTable({
|
||||
</select>
|
||||
<div className="ml-auto flex min-w-[6.5rem] shrink-0 items-center justify-end gap-1 whitespace-nowrap text-xs text-base-content/35">
|
||||
{isFiltered && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-ghost btn-xs h-8 min-h-8 shrink-0 px-1 text-xs text-base-content/40"
|
||||
<Btn
|
||||
variant="ghost" size="sm" className="shrink-0"
|
||||
onClick={() => {
|
||||
setPositionFilter(ALL_PARTICIPANT_FILTER);
|
||||
setTierFilter(ALL_PARTICIPANT_FILTER);
|
||||
}}
|
||||
>
|
||||
초기화
|
||||
</button>
|
||||
</Btn>
|
||||
)}
|
||||
<span className="w-10 shrink-0 text-right tabular-nums">
|
||||
{filteredParticipants.length}/{participants.length}명
|
||||
@@ -1759,22 +1763,25 @@ export default function MatchDetailPage() {
|
||||
|
||||
if (matchQuery.isLoading) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<span className="text-sm text-base-content/40">
|
||||
매치 정보를 불러오는 중...
|
||||
</span>
|
||||
</main>
|
||||
<PlainPage>
|
||||
<LoadingNote label="내전 정보를 불러오는 중" />
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
if (matchQuery.error || !matchQuery.data) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h2 className="text-lg font-bold mb-2">내전을 찾을 수 없습니다</h2>
|
||||
<Link to="/" className="btn btn-ghost btn-sm mt-4">
|
||||
홈으로 돌아가기
|
||||
</Link>
|
||||
</main>
|
||||
<PlainPage>
|
||||
<EmptyNote
|
||||
title="내전을 찾을 수 없습니다"
|
||||
description="주소가 바뀌었거나 삭제된 내전일 수 있습니다."
|
||||
action={
|
||||
<Btn to="/" variant="secondary">
|
||||
내전 목록으로
|
||||
</Btn>
|
||||
}
|
||||
/>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1888,88 +1895,74 @@ export default function MatchDetailPage() {
|
||||
}
|
||||
|
||||
return (
|
||||
<main
|
||||
className={`mx-auto px-4 py-6 sm:px-6 ${
|
||||
MATCH_PAGE_MAX_WIDTH_CLASS
|
||||
}`}
|
||||
>
|
||||
<Link
|
||||
to="/"
|
||||
className="inline-flex items-center gap-1 text-xs text-base-content/40 hover:text-base-content transition-colors mb-5"
|
||||
>
|
||||
<ChevronLeft className="h-3.5 w-3.5" aria-hidden="true" />
|
||||
목록으로
|
||||
</Link>
|
||||
|
||||
<div className="mb-6 pb-5 border-b border-base-content/8">
|
||||
<div className="flex items-center gap-2.5 flex-wrap mb-2">
|
||||
<h1 className="text-xl sm:text-2xl font-bold text-base-content leading-tight">
|
||||
{match.title}
|
||||
</h1>
|
||||
<span
|
||||
className={`inline-flex items-center text-xs font-semibold px-1.5 py-0.5 border ${si.cls}`}
|
||||
>
|
||||
<>
|
||||
<PageHero
|
||||
crumbs={[{ label: "내전", to: "/" }, { label: match.title }]}
|
||||
title={match.title}
|
||||
badges={
|
||||
<Pill tone={si.tone} dot={si.live} pulse={si.live}>
|
||||
{si.label}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-sm text-base-content/50 mb-2.5">
|
||||
{match.description}
|
||||
</p>
|
||||
<div className="flex items-center gap-3 text-xs text-base-content/40 flex-wrap">
|
||||
<span>
|
||||
</Pill>
|
||||
}
|
||||
meta={
|
||||
<>
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<CalendarDays className="size-4" aria-hidden="true" />
|
||||
{match.date} {match.time}
|
||||
</span>
|
||||
<span className="text-base-content/15">|</span>
|
||||
<span>
|
||||
{match.participants.length}/{match.maxParticipants}명
|
||||
</span>
|
||||
<span className="text-base-content/15">|</span>
|
||||
<span className="inline-flex items-center text-xs px-1.5 py-0.5 border border-base-content/10 text-base-content/40">
|
||||
<MetaDot />
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<MapIcon className="size-4" aria-hidden="true" />
|
||||
{match.map}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<MetaDot />
|
||||
<span className="tabular inline-flex items-center gap-1.5">
|
||||
<Users className="size-4" aria-hidden="true" />
|
||||
<span>
|
||||
<strong className="text-on-ink">
|
||||
{match.participants.length}
|
||||
</strong>
|
||||
/{match.maxParticipants}명
|
||||
</span>
|
||||
</span>
|
||||
</>
|
||||
}
|
||||
description={match.description || undefined}
|
||||
actions={
|
||||
showAuctionLink ? (
|
||||
<Btn to={`/match/${match.id}/auction`} variant="primary" size="lg">
|
||||
경매 보기
|
||||
</Btn>
|
||||
) : undefined
|
||||
}
|
||||
/>
|
||||
<PageBody>
|
||||
{joinMatchMutation.error instanceof Error && (
|
||||
<div className="mb-4 border border-error/20 bg-error/10 px-4 py-3 text-sm text-error">
|
||||
{joinMatchMutation.error.message}
|
||||
</div>
|
||||
<ErrorNote className="mb-4" title="요청을 처리하지 못했습니다" description={joinMatchMutation.error.message} />
|
||||
)}
|
||||
|
||||
{startAuctionMutation.error instanceof Error && (
|
||||
<div className="mb-4 border border-error/20 bg-error/10 px-4 py-3 text-sm text-error">
|
||||
{startAuctionMutation.error.message}
|
||||
</div>
|
||||
<ErrorNote className="mb-4" title="요청을 처리하지 못했습니다" description={startAuctionMutation.error.message} />
|
||||
)}
|
||||
|
||||
{removeParticipantMutation.error instanceof Error && (
|
||||
<div className="mb-4 border border-error/20 bg-error/10 px-4 py-3 text-sm text-error">
|
||||
{removeParticipantMutation.error.message}
|
||||
</div>
|
||||
<ErrorNote className="mb-4" title="요청을 처리하지 못했습니다" description={removeParticipantMutation.error.message} />
|
||||
)}
|
||||
|
||||
{updateParticipantMutation.error instanceof Error && (
|
||||
<div className="mb-4 border border-error/20 bg-error/10 px-4 py-3 text-sm text-error">
|
||||
{updateParticipantMutation.error.message}
|
||||
</div>
|
||||
<ErrorNote className="mb-4" title="요청을 처리하지 못했습니다" description={updateParticipantMutation.error.message} />
|
||||
)}
|
||||
|
||||
{pollTournamentResultMutation.error instanceof Error && (
|
||||
<div className="mb-4 border border-error/20 bg-error/10 px-4 py-3 text-sm text-error">
|
||||
{pollTournamentResultMutation.error.message}
|
||||
</div>
|
||||
<ErrorNote className="mb-4" title="요청을 처리하지 못했습니다" description={pollTournamentResultMutation.error.message} />
|
||||
)}
|
||||
|
||||
{collectResultByWindowMutation.error instanceof Error && (
|
||||
<div className="mb-4 border border-error/20 bg-error/10 px-4 py-3 text-sm text-error">
|
||||
{collectResultByWindowMutation.error.message}
|
||||
</div>
|
||||
<ErrorNote className="mb-4" title="요청을 처리하지 못했습니다" description={collectResultByWindowMutation.error.message} />
|
||||
)}
|
||||
|
||||
{collectResultByRiotMatchMutation.error instanceof Error && (
|
||||
<div className="mb-4 border border-error/20 bg-error/10 px-4 py-3 text-sm text-error">
|
||||
{collectResultByRiotMatchMutation.error.message}
|
||||
</div>
|
||||
<ErrorNote className="mb-4" title="요청을 처리하지 못했습니다" description={collectResultByRiotMatchMutation.error.message} />
|
||||
)}
|
||||
|
||||
{usesTabbedLayout && activeMatchTab && (
|
||||
@@ -2181,12 +2174,12 @@ export default function MatchDetailPage() {
|
||||
</div>
|
||||
|
||||
{showAuctionLink ? (
|
||||
<Link
|
||||
<Btn
|
||||
to={`/match/${match.id}/auction`}
|
||||
className="btn btn-primary btn-sm px-5 text-xs"
|
||||
variant="primary"
|
||||
>
|
||||
경매 페이지 열기
|
||||
</Link>
|
||||
</Btn>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
{captainSlots.length > 0 ? (
|
||||
@@ -2203,7 +2196,7 @@ export default function MatchDetailPage() {
|
||||
{teamIndexLabel(slot.teamIndex)} 팀장
|
||||
<div className="mt-1 grid grid-cols-[minmax(0,1fr)_96px] gap-2">
|
||||
<select
|
||||
className="w-full border border-base-content/10 bg-transparent px-2 py-2 text-sm"
|
||||
className="lts-select w-full"
|
||||
value={currentValue}
|
||||
onChange={(event) =>
|
||||
setCaptainSelections((current) => ({
|
||||
@@ -2247,7 +2240,7 @@ export default function MatchDetailPage() {
|
||||
min={100}
|
||||
max={100000}
|
||||
step={50}
|
||||
className="w-full border border-base-content/10 bg-transparent px-2 py-2 text-sm tabular-nums"
|
||||
className="lts-input w-full tabular-nums"
|
||||
value={
|
||||
currentSelection?.initialTeamBidPointAmountInput ??
|
||||
"1000"
|
||||
@@ -2300,7 +2293,7 @@ export default function MatchDetailPage() {
|
||||
min={5}
|
||||
max={MAX_AUCTION_TIMER_SECONDS}
|
||||
step={5}
|
||||
className="min-w-0 flex-1 bg-transparent px-2 py-2 text-sm tabular-nums focus:outline-none"
|
||||
className="lts-input min-w-0 flex-1 tabular-nums"
|
||||
value={maximumBidRoundDurationSecondsInput}
|
||||
onChange={(event) =>
|
||||
setMaximumBidRoundDurationSecondsInput(
|
||||
@@ -2334,7 +2327,7 @@ export default function MatchDetailPage() {
|
||||
min={0}
|
||||
max={MAX_AUCTION_TIMER_SECONDS}
|
||||
step={1}
|
||||
className="min-w-0 flex-1 bg-transparent px-2 py-2 text-sm tabular-nums focus:outline-none"
|
||||
className="lts-input min-w-0 flex-1 tabular-nums"
|
||||
value={bidRoundExtensionSecondsInput}
|
||||
onChange={(event) =>
|
||||
setBidRoundExtensionSecondsInput(
|
||||
@@ -2367,7 +2360,7 @@ export default function MatchDetailPage() {
|
||||
<label className="block text-xs text-base-content/45">
|
||||
상위 티어 우선 등장
|
||||
<select
|
||||
className="mt-1 h-[38px] w-full border border-base-content/10 bg-transparent px-2 py-2 text-sm focus:border-primary/30 focus:outline-none"
|
||||
className="lts-select mt-1 w-full"
|
||||
value={topTierAuctionPriorityThreshold}
|
||||
onChange={(event) =>
|
||||
setTopTierAuctionPriorityThreshold(
|
||||
@@ -2416,7 +2409,7 @@ export default function MatchDetailPage() {
|
||||
</span>
|
||||
<input
|
||||
type="checkbox"
|
||||
className="checkbox checkbox-primary checkbox-xs"
|
||||
className="lts-checkbox"
|
||||
checked={checked}
|
||||
onChange={(event) =>
|
||||
setManualTopTierAuctionPriorityUserIds(
|
||||
@@ -2447,9 +2440,8 @@ export default function MatchDetailPage() {
|
||||
</div>
|
||||
)}
|
||||
<div className="sm:col-span-2 flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm px-5 text-xs"
|
||||
<Btn
|
||||
variant="primary"
|
||||
disabled={
|
||||
!canStartAuction || startAuctionMutation.isPending
|
||||
}
|
||||
@@ -2460,7 +2452,7 @@ export default function MatchDetailPage() {
|
||||
{startAuctionMutation.isPending
|
||||
? "시작 중..."
|
||||
: "경매 시작"}
|
||||
</button>
|
||||
</Btn>
|
||||
{!canUseMemberActions && (
|
||||
<span className="text-xs text-warning">
|
||||
로그인 또는 Dev Auth에 owner/admin User ID를 먼저
|
||||
@@ -2490,12 +2482,12 @@ export default function MatchDetailPage() {
|
||||
))}
|
||||
{showAuctionLink && (
|
||||
<div className="flex justify-end">
|
||||
<Link
|
||||
<Btn
|
||||
to={`/match/${match.id}/auction`}
|
||||
className="btn btn-primary btn-sm px-5 text-xs"
|
||||
variant="primary"
|
||||
>
|
||||
경매 페이지 열기
|
||||
</Link>
|
||||
</Btn>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -2538,16 +2530,15 @@ export default function MatchDetailPage() {
|
||||
<div className="mb-2 text-xs font-bold text-base-content/45">
|
||||
토너먼트 코드
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm w-full text-xs"
|
||||
<Btn
|
||||
variant="primary" className="w-full"
|
||||
disabled={pollTournamentResultMutation.isPending}
|
||||
onClick={handlePollTournamentResult}
|
||||
>
|
||||
{pollTournamentResultMutation.isPending
|
||||
? "등록 중..."
|
||||
: "결과 다시 수집"}
|
||||
</button>
|
||||
</Btn>
|
||||
</div>
|
||||
|
||||
<div className="border-t border-base-content/8 pt-4">
|
||||
@@ -2564,7 +2555,7 @@ export default function MatchDetailPage() {
|
||||
onChange={(event) =>
|
||||
setManualResultStartTime(event.target.value)
|
||||
}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-2 py-2 text-xs text-base-content focus:outline-none focus:border-primary/30"
|
||||
className="lts-input mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<label className="block text-xs text-base-content/35">
|
||||
@@ -2576,12 +2567,11 @@ export default function MatchDetailPage() {
|
||||
onChange={(event) =>
|
||||
setManualResultEndTime(event.target.value)
|
||||
}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-2 py-2 text-xs text-base-content focus:outline-none focus:border-primary/30"
|
||||
className="lts-input mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-outline btn-sm w-full text-xs"
|
||||
<Btn
|
||||
variant="secondary" className="w-full"
|
||||
disabled={
|
||||
collectResultByWindowMutation.isPending ||
|
||||
!toIsoFromLocalDateTime(manualResultStartTime) ||
|
||||
@@ -2592,7 +2582,7 @@ export default function MatchDetailPage() {
|
||||
{collectResultByWindowMutation.isPending
|
||||
? "수집 중..."
|
||||
: "시간 범위로 수집"}
|
||||
</button>
|
||||
</Btn>
|
||||
{formatManualCollectSummary(
|
||||
collectResultByWindowMutation.data,
|
||||
) && (
|
||||
@@ -2617,11 +2607,10 @@ export default function MatchDetailPage() {
|
||||
setManualRiotMatchId(event.target.value)
|
||||
}
|
||||
placeholder="KR_1234567890"
|
||||
className="w-full border border-base-content/10 bg-transparent px-2 py-2 text-xs text-base-content focus:outline-none focus:border-primary/30"
|
||||
className="lts-input w-full"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-outline btn-sm w-full text-xs"
|
||||
<Btn
|
||||
variant="secondary" className="w-full"
|
||||
disabled={
|
||||
collectResultByRiotMatchMutation.isPending ||
|
||||
!manualRiotMatchId.trim()
|
||||
@@ -2631,7 +2620,7 @@ export default function MatchDetailPage() {
|
||||
{collectResultByRiotMatchMutation.isPending
|
||||
? "수집 중..."
|
||||
: "Match ID로 수집"}
|
||||
</button>
|
||||
</Btn>
|
||||
{formatManualCollectSummary(
|
||||
collectResultByRiotMatchMutation.data,
|
||||
) && (
|
||||
@@ -2682,6 +2671,7 @@ export default function MatchDetailPage() {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||
import { Link, useLocation, useParams } from "react-router";
|
||||
import {
|
||||
Area,
|
||||
@@ -52,6 +53,15 @@ import {
|
||||
SummonerSpellIcon,
|
||||
} from "../components/ItemTooltip";
|
||||
|
||||
import {
|
||||
Btn,
|
||||
EmptyNote,
|
||||
LoadingNote,
|
||||
MetaDot,
|
||||
PageBody,
|
||||
PageHero,
|
||||
PlainPage,
|
||||
} from "../ui";
|
||||
type MatchGameDetail = ApiInternalMatchDetailResponse["games"][number];
|
||||
type MatchGameTeam = MatchGameDetail["teams"][number];
|
||||
type MatchGameParticipant = MatchGameTeam["participants"][number];
|
||||
@@ -185,16 +195,16 @@ function sideLabel(side: TeamSide) {
|
||||
function sideTone(side: TeamSide) {
|
||||
return side === "blue"
|
||||
? {
|
||||
border: "border-blue-500/20",
|
||||
bg: "bg-blue-500/5",
|
||||
text: "text-blue-400",
|
||||
bar: "bg-blue-500",
|
||||
border: "border-win-line",
|
||||
bg: "bg-win-tint",
|
||||
text: "text-win",
|
||||
bar: "bg-win",
|
||||
}
|
||||
: {
|
||||
border: "border-red-500/20",
|
||||
bg: "bg-red-500/5",
|
||||
text: "text-red-400",
|
||||
bar: "bg-red-500",
|
||||
border: "border-loss-line",
|
||||
bg: "bg-loss-tint",
|
||||
text: "text-loss",
|
||||
bar: "bg-loss",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -405,7 +415,7 @@ function PlayerIdentityCell({
|
||||
<div className="mt-0.5 flex items-center gap-1.5">
|
||||
<span className="text-xs text-base-content/35">{lane}</span>
|
||||
{(participant.firstBloodKill || participant.firstBloodAssist) && (
|
||||
<span className="inline-flex border border-amber-400/30 bg-amber-400/10 px-1 text-[10px] font-black text-amber-400">
|
||||
<span className="inline-flex border border-amber-400/30 bg-amber-400/10 px-1 text-[10px] font-black text-gold">
|
||||
{participant.firstBloodKill ? "FB" : "FBA"}
|
||||
</span>
|
||||
)}
|
||||
@@ -438,7 +448,7 @@ function PlayerRow({
|
||||
<div className="text-sm font-black tabular-nums text-base-content">
|
||||
{participant.kills}
|
||||
<span className="text-base-content/25"> / </span>
|
||||
<span className="text-red-400">{participant.deaths}</span>
|
||||
<span className="text-loss">{participant.deaths}</span>
|
||||
<span className="text-base-content/25"> / </span>
|
||||
{participant.assists}
|
||||
</div>
|
||||
@@ -519,7 +529,7 @@ function PlayerCard({
|
||||
<div className="text-sm font-black tabular-nums text-base-content">
|
||||
{participant.kills}
|
||||
<span className="text-base-content/25"> / </span>
|
||||
<span className="text-red-400">{participant.deaths}</span>
|
||||
<span className="text-loss">{participant.deaths}</span>
|
||||
<span className="text-base-content/25"> / </span>
|
||||
{participant.assists}
|
||||
</div>
|
||||
@@ -830,7 +840,7 @@ function ObjectiveComparisonStrip({
|
||||
<span
|
||||
className={`text-right font-black ${
|
||||
objective.blue > objective.red
|
||||
? "text-blue-400"
|
||||
? "text-win"
|
||||
: "text-base-content/50"
|
||||
}`}
|
||||
>
|
||||
@@ -842,7 +852,7 @@ function ObjectiveComparisonStrip({
|
||||
<span
|
||||
className={`font-black ${
|
||||
objective.red > objective.blue
|
||||
? "text-red-400"
|
||||
? "text-loss"
|
||||
: "text-base-content/50"
|
||||
}`}
|
||||
>
|
||||
@@ -851,10 +861,10 @@ function ObjectiveComparisonStrip({
|
||||
</div>
|
||||
{objective.key === "dragon" ? (
|
||||
<div className="mt-1 grid grid-cols-2 gap-2 text-[9px] font-bold leading-tight">
|
||||
<span className="text-right text-blue-400/70">
|
||||
<span className="text-right text-win">
|
||||
{objective.blueDetail}
|
||||
</span>
|
||||
<span className="text-red-400/70">{objective.redDetail}</span>
|
||||
<span className="text-loss">{objective.redDetail}</span>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
@@ -892,7 +902,7 @@ function GoldComparisonStrip({
|
||||
return (
|
||||
<div className="border-t border-base-content/8 bg-base-content/[0.01] px-4 py-3">
|
||||
<div className="grid gap-3 md:grid-cols-[minmax(0,1fr)_11rem_minmax(0,1fr)] md:items-center">
|
||||
<div className="min-w-0 text-blue-400">
|
||||
<div className="min-w-0 text-win">
|
||||
<div className="flex items-center justify-between gap-3 text-xs font-black">
|
||||
<span className="truncate">
|
||||
{getTeamName(detail, blueTeam.teamIndex)}
|
||||
@@ -903,7 +913,7 @@ function GoldComparisonStrip({
|
||||
</div>
|
||||
<div className="mt-1 h-1.5 bg-base-content/8">
|
||||
<div
|
||||
className="h-full bg-blue-500"
|
||||
className="h-full bg-win"
|
||||
style={{ width: barWidth(blueTotals.gold, maxGold) }}
|
||||
/>
|
||||
</div>
|
||||
@@ -915,9 +925,9 @@ function GoldComparisonStrip({
|
||||
<div
|
||||
className={`mt-1 text-lg font-black tabular-nums ${
|
||||
goldDiff > 0
|
||||
? "text-blue-400"
|
||||
? "text-win"
|
||||
: goldDiff < 0
|
||||
? "text-red-400"
|
||||
? "text-loss"
|
||||
: "text-base-content/55"
|
||||
}`}
|
||||
>
|
||||
@@ -927,7 +937,7 @@ function GoldComparisonStrip({
|
||||
{leaderName}
|
||||
</div>
|
||||
</div>
|
||||
<div className="min-w-0 text-red-400">
|
||||
<div className="min-w-0 text-loss">
|
||||
<div className="flex items-center justify-between gap-3 text-xs font-black">
|
||||
<span className="tabular-nums">{formatNumber(redTotals.gold)}</span>
|
||||
<span className="truncate text-right">
|
||||
@@ -936,7 +946,7 @@ function GoldComparisonStrip({
|
||||
</div>
|
||||
<div className="mt-1 h-1.5 bg-base-content/8">
|
||||
<div
|
||||
className="ml-auto h-full bg-red-500"
|
||||
className="ml-auto h-full bg-loss"
|
||||
style={{ width: barWidth(redTotals.gold, maxGold) }}
|
||||
/>
|
||||
</div>
|
||||
@@ -986,13 +996,13 @@ function TimelineTooltip({
|
||||
{leaderName} {formatSignedCompactNumber(point.value)}
|
||||
</div>
|
||||
<div className="mt-2 grid grid-cols-2 gap-3 tabular-nums">
|
||||
<div className="text-blue-400">
|
||||
<div className="text-win">
|
||||
{blueTeamName}
|
||||
<span className="block font-black">
|
||||
{formatNumber(point.blueTotal)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="text-red-400">
|
||||
<div className="text-loss">
|
||||
{redTeamName}
|
||||
<span className="block font-black">
|
||||
{formatNumber(point.redTotal)}
|
||||
@@ -1308,9 +1318,9 @@ function TimelineGraph({
|
||||
</ResponsiveContainer>
|
||||
</div>
|
||||
<div className="mt-2 flex items-center justify-between gap-3 text-[11px] font-black uppercase tracking-wider">
|
||||
<span className="text-blue-400">{blueTeamName}</span>
|
||||
<span className="text-win">{blueTeamName}</span>
|
||||
<span className="text-base-content/25">0</span>
|
||||
<span className="text-red-400">{redTeamName}</span>
|
||||
<span className="text-loss">{redTeamName}</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
@@ -1382,9 +1392,9 @@ function TimelineGraph({
|
||||
<span
|
||||
className={`text-[10px] font-black uppercase tracking-wider ${
|
||||
event.side === "blue"
|
||||
? "text-blue-400"
|
||||
? "text-win"
|
||||
: event.side === "red"
|
||||
? "text-red-400"
|
||||
? "text-loss"
|
||||
: "text-base-content/35"
|
||||
}`}
|
||||
>
|
||||
@@ -1513,31 +1523,58 @@ function GameTabs({
|
||||
currentGameNumber: number;
|
||||
navigationState: MatchGameNavigationState | undefined;
|
||||
}) {
|
||||
const currentRef = useRef<HTMLAnchorElement | null>(null);
|
||||
const currentIndex = detail.games.findIndex(
|
||||
(game) => game.gameNumber === currentGameNumber,
|
||||
);
|
||||
const previousGame = detail.games[currentIndex - 1];
|
||||
const nextGame = detail.games[currentIndex + 1];
|
||||
const pathFor = (gameNumber: number) =>
|
||||
internalMatchGamePath(communityId, detail.match.matchId, gameNumber);
|
||||
|
||||
useEffect(() => {
|
||||
currentRef.current?.scrollIntoView({ block: "nearest", inline: "center" });
|
||||
}, [currentGameNumber]);
|
||||
|
||||
const stepClass =
|
||||
"grid size-10 shrink-0 place-items-center rounded-[10px] text-content-muted transition-colors hover:bg-sunken hover:text-content aria-disabled:pointer-events-none aria-disabled:opacity-30";
|
||||
|
||||
return (
|
||||
<nav
|
||||
className="mt-4 flex overflow-x-auto border border-base-content/10 bg-base-100"
|
||||
className="lts-panel sticky top-[60px] z-30 flex items-center gap-1 p-1"
|
||||
aria-label="세트 선택"
|
||||
>
|
||||
<Link
|
||||
to={previousGame ? pathFor(previousGame.gameNumber) : "#"}
|
||||
state={navigationState}
|
||||
aria-disabled={!previousGame}
|
||||
tabIndex={previousGame ? undefined : -1}
|
||||
aria-label="이전 세트"
|
||||
className={stepClass}
|
||||
>
|
||||
<ChevronLeft className="size-4" aria-hidden="true" />
|
||||
</Link>
|
||||
<div className="no-scrollbar flex min-w-0 flex-1 gap-1 overflow-x-auto">
|
||||
{detail.games.map((game) => {
|
||||
const winnerTeam = game.teams.find((team) => team.win);
|
||||
const active = game.gameNumber === currentGameNumber;
|
||||
return (
|
||||
<Link
|
||||
key={game.gameNumber}
|
||||
to={internalMatchGamePath(
|
||||
communityId,
|
||||
detail.match.matchId,
|
||||
game.gameNumber,
|
||||
)}
|
||||
ref={active ? currentRef : undefined}
|
||||
to={pathFor(game.gameNumber)}
|
||||
state={navigationState}
|
||||
className={`min-w-[8rem] border-r border-base-content/8 px-4 py-3 text-xs transition-colors last:border-r-0 ${
|
||||
aria-current={active ? "page" : undefined}
|
||||
className={`flex h-10 shrink-0 items-center gap-2 rounded-[10px] px-3.5 text-sm transition-colors ${
|
||||
active
|
||||
? "bg-primary/8 text-primary"
|
||||
: "text-base-content/45 hover:bg-base-content/[0.03] hover:text-base-content"
|
||||
? "bg-secondary text-secondary-content dark:bg-white dark:text-[#14161b]"
|
||||
: "text-content-muted hover:bg-sunken hover:text-content"
|
||||
}`}
|
||||
>
|
||||
<span className="block font-black">{game.gameNumber}세트</span>
|
||||
<span className="mt-1 block truncate">
|
||||
<span className="font-bold">{game.gameNumber}세트</span>
|
||||
<span
|
||||
className={`max-w-28 truncate text-xs ${active ? "opacity-80" : "text-content-subtle"}`}
|
||||
>
|
||||
{winnerTeam
|
||||
? `${getTeamName(detail, winnerTeam.teamIndex)} 승`
|
||||
: "결과 대기"}
|
||||
@@ -1545,22 +1582,29 @@ function GameTabs({
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<Link
|
||||
to={nextGame ? pathFor(nextGame.gameNumber) : "#"}
|
||||
state={navigationState}
|
||||
aria-disabled={!nextGame}
|
||||
tabIndex={nextGame ? undefined : -1}
|
||||
aria-label="다음 세트"
|
||||
className={stepClass}
|
||||
>
|
||||
<ChevronRight className="size-4" aria-hidden="true" />
|
||||
</Link>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
function MatchScoreHero({
|
||||
detail,
|
||||
communityId,
|
||||
selectedGame,
|
||||
backTarget,
|
||||
navigationState,
|
||||
}: {
|
||||
detail: ApiInternalMatchDetailResponse;
|
||||
communityId: string;
|
||||
selectedGame: MatchGameDetail;
|
||||
backTarget: MatchGameBackTarget;
|
||||
navigationState: MatchGameNavigationState | undefined;
|
||||
}) {
|
||||
const selectedSeries = resolveSelectedSeries(detail, selectedGame);
|
||||
const [leftTeam, rightTeam] = selectedGame.teams;
|
||||
@@ -1572,77 +1616,78 @@ function MatchScoreHero({
|
||||
selectedSeries?.teamBIndex === rightTeam?.teamIndex
|
||||
? selectedSeries?.teamBWins
|
||||
: selectedSeries?.teamAWins;
|
||||
const sideTone = (side: TeamSide) =>
|
||||
side === "blue" ? "text-[#8fb6ff]" : "text-[#ff99a5]";
|
||||
|
||||
return (
|
||||
<section className="mt-5 border border-base-content/10 bg-base-content/[0.02] p-5">
|
||||
<div className="flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between">
|
||||
<div className="min-w-0">
|
||||
<Link
|
||||
to={backTarget.to}
|
||||
className="text-xs text-base-content/40 hover:text-base-content"
|
||||
>
|
||||
← {backTarget.label}
|
||||
</Link>
|
||||
<h1 className="mt-4 text-2xl font-black text-base-content">
|
||||
{detail.match.title} · {selectedGame.gameNumber}세트
|
||||
</h1>
|
||||
<p className="mt-2 text-sm text-base-content/45">
|
||||
{formatDateTime(selectedGame.gameCreation)} ·{" "}
|
||||
{formatDuration(selectedGame.gameDuration)} ·{" "}
|
||||
<span className="font-mono">{selectedGame.riotMatchId}</span>
|
||||
</p>
|
||||
</div>
|
||||
{leftTeam && rightTeam && (
|
||||
<div className="grid min-w-full grid-cols-[1fr_auto_1fr] items-center gap-4 lg:min-w-[440px]">
|
||||
<PageHero
|
||||
width="xl"
|
||||
crumbs={[
|
||||
{ label: backTarget.label, to: backTarget.to },
|
||||
{ label: `${selectedGame.gameNumber}세트` },
|
||||
]}
|
||||
title={
|
||||
<>
|
||||
{detail.match.title}
|
||||
<span className="ml-2 text-on-ink-muted">
|
||||
{selectedGame.gameNumber}세트
|
||||
</span>
|
||||
</>
|
||||
}
|
||||
meta={
|
||||
<>
|
||||
<span>{formatDateTime(selectedGame.gameCreation)}</span>
|
||||
<MetaDot />
|
||||
<span className="tabular">
|
||||
{formatDuration(selectedGame.gameDuration)}
|
||||
</span>
|
||||
<MetaDot />
|
||||
<span className="font-mono text-xs">{selectedGame.riotMatchId}</span>
|
||||
</>
|
||||
}
|
||||
actions={
|
||||
leftTeam && rightTeam ? (
|
||||
<div className="grid w-full grid-cols-[1fr_auto_1fr] items-center gap-4 sm:w-auto sm:min-w-[400px]">
|
||||
<div className="min-w-0 text-right">
|
||||
<div
|
||||
className={`min-w-0 text-right ${
|
||||
leftTeam.win
|
||||
? teamIndexColorClasses(leftTeam.teamIndex).text
|
||||
: "text-base-content/30"
|
||||
}`}
|
||||
className={`truncate text-[15px] font-bold ${leftTeam.win ? "text-on-ink" : "text-on-ink-muted"}`}
|
||||
>
|
||||
<div className="truncate text-sm font-black">
|
||||
{getTeamName(detail, leftTeam.teamIndex)}
|
||||
</div>
|
||||
<div className="mt-1 text-xs font-bold text-base-content/35">
|
||||
{sideLabel(leftTeam.side)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-3 text-center">
|
||||
<span className="text-4xl font-black tabular-nums text-base-content">
|
||||
{leftScore ?? (leftTeam.win ? 1 : 0)}
|
||||
</span>
|
||||
<span className="text-xs font-black text-base-content/15">
|
||||
VS
|
||||
</span>
|
||||
<span className="text-4xl font-black tabular-nums text-base-content">
|
||||
{rightScore ?? (rightTeam.win ? 1 : 0)}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
className={`min-w-0 ${
|
||||
rightTeam.win
|
||||
? teamIndexColorClasses(rightTeam.teamIndex).text
|
||||
: "text-base-content/30"
|
||||
}`}
|
||||
className={`mt-0.5 text-xs font-semibold ${sideTone(leftTeam.side)}`}
|
||||
>
|
||||
{sideLabel(leftTeam.side)}
|
||||
{leftTeam.win && " · 세트 승"}
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-center">
|
||||
<div className="tabular flex items-baseline gap-2.5 text-4xl font-extrabold">
|
||||
<span>{leftScore ?? (leftTeam.win ? 1 : 0)}</span>
|
||||
<span className="text-xl text-on-ink-muted">:</span>
|
||||
<span>{rightScore ?? (rightTeam.win ? 1 : 0)}</span>
|
||||
</div>
|
||||
<div className="mt-0.5 text-[11px] font-semibold text-on-ink-muted">
|
||||
시리즈 스코어
|
||||
</div>
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<div
|
||||
className={`truncate text-[15px] font-bold ${rightTeam.win ? "text-on-ink" : "text-on-ink-muted"}`}
|
||||
>
|
||||
<div className="truncate text-sm font-black">
|
||||
{getTeamName(detail, rightTeam.teamIndex)}
|
||||
</div>
|
||||
<div className="mt-1 text-xs font-bold text-base-content/35">
|
||||
<div
|
||||
className={`mt-0.5 text-xs font-semibold ${sideTone(rightTeam.side)}`}
|
||||
>
|
||||
{sideLabel(rightTeam.side)}
|
||||
{rightTeam.win && " · 세트 승"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<GameTabs
|
||||
detail={detail}
|
||||
communityId={communityId}
|
||||
currentGameNumber={selectedGame.gameNumber}
|
||||
navigationState={navigationState}
|
||||
) : undefined
|
||||
}
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1665,20 +1710,20 @@ export default function MatchGameDetailPage() {
|
||||
|
||||
if (detailQuery.isLoading) {
|
||||
return (
|
||||
<main className="mx-auto max-w-6xl px-4 py-20 text-center text-sm text-base-content/40">
|
||||
세트 상세 기록을 불러오는 중...
|
||||
</main>
|
||||
<PlainPage>
|
||||
<LoadingNote label="세트 기록을 불러오는 중" />
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
if (detailQuery.error || !detail) {
|
||||
return (
|
||||
<main className="mx-auto max-w-6xl px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">세트 기록을 찾을 수 없습니다</h1>
|
||||
<Link to={backTarget.to} className="btn btn-ghost btn-sm mt-4">
|
||||
{backTarget.label}
|
||||
</Link>
|
||||
</main>
|
||||
<PlainPage>
|
||||
<EmptyNote
|
||||
title="세트 기록을 찾을 수 없습니다"
|
||||
action={<Btn to={backTarget.to}>{backTarget.label}</Btn>}
|
||||
/>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1694,34 +1739,36 @@ export default function MatchGameDetailPage() {
|
||||
? `${requestedGameNumber}경기`
|
||||
: "요청한 경기";
|
||||
return (
|
||||
<main className="mx-auto max-w-6xl px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">
|
||||
{hasRecordedGames
|
||||
<PlainPage>
|
||||
<EmptyNote
|
||||
title={
|
||||
hasRecordedGames
|
||||
? "해당 경기 기록을 찾을 수 없습니다"
|
||||
: "수집된 세트 기록이 없습니다"}
|
||||
</h1>
|
||||
{hasRecordedGames && (
|
||||
<p className="mt-2 text-sm text-content-muted">
|
||||
{requestedGameLabel}가 현재 상세 기록에 없습니다.
|
||||
</p>
|
||||
)}
|
||||
<Link
|
||||
to={backTarget.to}
|
||||
className="btn btn-ghost btn-sm mt-4"
|
||||
>
|
||||
{backTarget.label}
|
||||
</Link>
|
||||
</main>
|
||||
: "수집된 세트 기록이 없습니다"
|
||||
}
|
||||
description={
|
||||
hasRecordedGames
|
||||
? `${requestedGameLabel}가 현재 상세 기록에 없습니다.`
|
||||
: undefined
|
||||
}
|
||||
action={<Btn to={backTarget.to}>{backTarget.label}</Btn>}
|
||||
/>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="mx-auto max-w-6xl px-4 py-6 sm:px-6">
|
||||
<>
|
||||
<MatchScoreHero
|
||||
detail={detail}
|
||||
communityId={communityId}
|
||||
selectedGame={selectedGame}
|
||||
backTarget={backTarget}
|
||||
/>
|
||||
<PageBody width="xl">
|
||||
<GameTabs
|
||||
detail={detail}
|
||||
communityId={communityId}
|
||||
currentGameNumber={selectedGame.gameNumber}
|
||||
navigationState={navigationState}
|
||||
/>
|
||||
|
||||
@@ -1757,6 +1804,7 @@ export default function MatchGameDetailPage() {
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</main>
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import type {
|
||||
CompetitionDetailResponse,
|
||||
SeriesProjection,
|
||||
} from "@lolympus/contracts";
|
||||
import { ArrowLeft, ChevronDown, UsersRound } from "lucide-react";
|
||||
import { ChevronDown, UsersRound } from "lucide-react";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { Link, useParams, useSearchParams } from "react-router";
|
||||
import { useCompetition, useTeamCompetition } from "../api/hooks";
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
sortTeamMembersForRoster,
|
||||
} from "./match-team-progress-view";
|
||||
|
||||
import { PageBody, PageHero } from "../ui";
|
||||
export default function MatchTeamProgressPage() {
|
||||
const { id } = useParams();
|
||||
const [searchParams] = useSearchParams();
|
||||
@@ -172,37 +173,31 @@ export default function MatchTeamProgressPage() {
|
||||
const rounds = competition.projection.rounds;
|
||||
|
||||
return (
|
||||
<main className="mx-auto max-w-5xl px-4 py-6 sm:px-6">
|
||||
<Link
|
||||
to={`/match/${id}`}
|
||||
className="mb-5 inline-flex min-h-11 items-center gap-1.5 text-sm font-bold text-content-muted hover:text-base-content focus-visible:ring-2 focus-visible:ring-primary"
|
||||
>
|
||||
<ArrowLeft className="h-4 w-4" aria-hidden="true" />
|
||||
내전 상세로
|
||||
</Link>
|
||||
|
||||
<header className="mb-8 flex flex-col gap-4 border-b border-base-content/10 pb-6 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div className="min-w-0">
|
||||
<p className="text-xs font-bold text-content-muted">팀 경기 현황</p>
|
||||
<h1
|
||||
ref={contentHeadingRef}
|
||||
className="mt-1 min-w-0 break-words text-2xl font-black sm:text-3xl"
|
||||
tabIndex={-1}
|
||||
>
|
||||
<>
|
||||
<PageHero
|
||||
crumbs={[
|
||||
{ label: "내전", to: "/" },
|
||||
{ label: "내전 상세", to: `/match/${id}` },
|
||||
{ label: "팀 경기 현황" },
|
||||
]}
|
||||
eyebrow="팀 경기 현황"
|
||||
title={
|
||||
<span ref={contentHeadingRef} tabIndex={-1} className="outline-none">
|
||||
{team?.name ?? (selectedTeamId ? "팀" : "내 팀")}
|
||||
</h1>
|
||||
<p className="mt-2 max-w-2xl text-sm text-content-muted">
|
||||
다음 상대와 세트별 토너먼트 코드를 한곳에서 확인할 수 있습니다.
|
||||
</p>
|
||||
</div>
|
||||
</span>
|
||||
}
|
||||
meta="다음 상대와 세트별 토너먼트 코드를 한곳에서 확인할 수 있습니다."
|
||||
actions={
|
||||
<Link
|
||||
to={`/match/${id}/team?select=1`}
|
||||
className="inline-flex min-h-11 shrink-0 items-center justify-center gap-2 border border-base-content/20 bg-base-100 px-3 text-sm font-bold text-base-content hover:border-primary/40 hover:bg-primary/5 focus-visible:ring-2 focus-visible:ring-primary"
|
||||
className="inline-flex h-10 shrink-0 items-center justify-center gap-2 rounded-field bg-white/10 px-4 text-sm font-bold text-on-ink transition-colors hover:bg-white/20"
|
||||
>
|
||||
<UsersRound className="h-4 w-4" aria-hidden="true" />
|
||||
팀 변경
|
||||
</Link>
|
||||
</header>
|
||||
}
|
||||
/>
|
||||
<PageBody>
|
||||
|
||||
<section className="mb-8" aria-labelledby="active-series-heading">
|
||||
<SectionHeading
|
||||
@@ -316,7 +311,8 @@ export default function MatchTeamProgressPage() {
|
||||
<EmptyState message="아직 종료된 대진이 없습니다." />
|
||||
)}
|
||||
</section>
|
||||
</main>
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -353,24 +349,22 @@ function TeamSelectionState({
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<main className="mx-auto max-w-5xl px-4 py-6 sm:px-6">
|
||||
<Link
|
||||
to={`/match/${matchId}`}
|
||||
className="mb-5 inline-flex min-h-11 items-center gap-1.5 text-sm font-bold text-content-muted hover:text-base-content focus-visible:ring-2 focus-visible:ring-primary"
|
||||
>
|
||||
<ArrowLeft className="h-4 w-4" aria-hidden="true" />
|
||||
내전 상세로
|
||||
</Link>
|
||||
|
||||
<header className="mb-6 border-b border-base-content/10 pb-5">
|
||||
<p className="text-xs font-bold text-content-muted">팀 경기 현황</p>
|
||||
<h1 ref={headingRef} className="mt-1 text-2xl font-black" tabIndex={-1}>
|
||||
<>
|
||||
<PageHero
|
||||
crumbs={[
|
||||
{ label: "내전", to: "/" },
|
||||
{ label: "내전 상세", to: `/match/${matchId}` },
|
||||
{ label: "팀 선택" },
|
||||
]}
|
||||
eyebrow="팀 경기 현황"
|
||||
title={
|
||||
<span ref={headingRef} tabIndex={-1} className="outline-none">
|
||||
팀 선택
|
||||
</h1>
|
||||
<p className="mt-1 text-sm text-content-muted">
|
||||
진행 상황과 토너먼트 코드를 확인할 팀을 선택해 주세요.
|
||||
</p>
|
||||
</header>
|
||||
</span>
|
||||
}
|
||||
meta="진행 상황과 토너먼트 코드를 확인할 팀을 선택해 주세요."
|
||||
/>
|
||||
<PageBody>
|
||||
|
||||
{competition.teams.length > 0 ? (
|
||||
<ul className="grid gap-3 sm:grid-cols-2">
|
||||
@@ -393,7 +387,8 @@ function TeamSelectionState({
|
||||
) : (
|
||||
<EmptyState message="구성된 팀이 없습니다." />
|
||||
)}
|
||||
</main>
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
import { lazy, Suspense, useState } from "react";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { ChevronDown, ChevronUp } from "lucide-react";
|
||||
import { Link, useLocation, useParams, useSearchParams } from "react-router";
|
||||
import { ChevronDown, ChevronUp, RefreshCw, X } from "lucide-react";
|
||||
import { useLocation, useParams, useSearchParams } from "react-router";
|
||||
import {
|
||||
Chip,
|
||||
EmptyNote,
|
||||
ErrorNote,
|
||||
MetaDot,
|
||||
PageBody,
|
||||
PageHero,
|
||||
Panel,
|
||||
PanelHeader,
|
||||
PlainPage,
|
||||
} from "../ui";
|
||||
import {
|
||||
useChampionStats,
|
||||
useDdragonManifest,
|
||||
@@ -52,6 +63,7 @@ import {
|
||||
RuneStyleIcon,
|
||||
SummonerSpellIcon,
|
||||
} from "../components/ItemTooltip";
|
||||
import { Btn } from "../ui/Btn";
|
||||
// recharts가 무거워 메인 번들에서 분리한다 (전적 페이지에서만 로드).
|
||||
const TierHistoryChart = lazy(() => import("../components/TierHistoryChart"));
|
||||
|
||||
@@ -128,18 +140,18 @@ function formatRefreshError(error: unknown) {
|
||||
}
|
||||
|
||||
function ratioClass(value: number) {
|
||||
if (value >= 55) return "text-blue-400";
|
||||
if (value >= 50) return "text-amber-400";
|
||||
return "text-base-content/50";
|
||||
if (value >= 60) return "text-loss";
|
||||
if (value >= 50) return "text-win";
|
||||
return "text-content-muted";
|
||||
}
|
||||
|
||||
function kdaClass(value: number) {
|
||||
if (value >= 4) return "text-amber-400";
|
||||
if (value >= 3) return "text-emerald-400";
|
||||
return "text-base-content/60";
|
||||
if (value >= 5) return "text-gold";
|
||||
if (value >= 3) return "text-leaf";
|
||||
return "text-content-muted";
|
||||
}
|
||||
|
||||
function FilterButton({
|
||||
function QueueTab({
|
||||
active,
|
||||
children,
|
||||
onClick,
|
||||
@@ -151,11 +163,13 @@ function FilterButton({
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-selected={active}
|
||||
onClick={onClick}
|
||||
className={`px-3 py-2 text-xs font-semibold border-b-2 transition-colors ${
|
||||
className={`h-10 flex-none whitespace-nowrap rounded-[10px] px-4 text-sm font-bold transition-colors ${
|
||||
active
|
||||
? "border-primary text-primary bg-primary/5"
|
||||
: "border-transparent text-base-content/45 hover:text-base-content"
|
||||
? "bg-secondary text-secondary-content dark:bg-white dark:text-[#14161b]"
|
||||
: "text-content-muted hover:bg-sunken hover:text-content"
|
||||
}`}
|
||||
>
|
||||
{children}
|
||||
@@ -206,20 +220,22 @@ function SummaryCard({
|
||||
label,
|
||||
value,
|
||||
sub,
|
||||
valueClassName = "text-content",
|
||||
}: {
|
||||
label: string;
|
||||
value: React.ReactNode;
|
||||
sub?: React.ReactNode;
|
||||
valueClassName?: string;
|
||||
}) {
|
||||
return (
|
||||
<div className="border border-base-content/8 bg-base-100 p-4">
|
||||
<div className="text-xs font-bold uppercase tracking-wider text-base-content/30">
|
||||
{label}
|
||||
</div>
|
||||
<div className="mt-2 text-2xl font-bold text-base-content tabular-nums">
|
||||
<div className="px-4 py-3.5 sm:px-5">
|
||||
<div className="text-xs font-semibold text-content-subtle">{label}</div>
|
||||
<div
|
||||
className={`tabular mt-1 text-[22px] font-extrabold leading-tight ${valueClassName}`}
|
||||
>
|
||||
{value}
|
||||
</div>
|
||||
{sub && <div className="mt-1 text-xs text-base-content/40">{sub}</div>}
|
||||
{sub && <div className="tabular mt-0.5 text-xs text-content-muted">{sub}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -293,8 +309,8 @@ function ChampionStatsTable({
|
||||
{row.games}
|
||||
</td>
|
||||
<td className="px-3 py-3 text-center text-xs tabular-nums text-base-content/55">
|
||||
<span className="text-blue-400">{row.wins}</span> /{" "}
|
||||
<span className="text-red-400">{row.losses}</span>
|
||||
<span className="text-win">{row.wins}</span> /{" "}
|
||||
<span className="text-loss">{row.losses}</span>
|
||||
</td>
|
||||
<td
|
||||
className={`px-3 py-3 text-center text-sm font-bold tabular-nums ${kdaClass(row.kda)}`}
|
||||
@@ -522,8 +538,8 @@ function DetailStatBar({
|
||||
|
||||
function TeamHeader({ team }: { team: ApiRecentMatchTeam }) {
|
||||
const sideLabel = team.side === 100 ? "블루팀" : "레드팀";
|
||||
const sideClass = team.side === 100 ? "text-blue-400" : "text-red-400";
|
||||
const resultClass = team.win ? "text-blue-400" : "text-red-400";
|
||||
const sideClass = team.side === 100 ? "text-win" : "text-loss";
|
||||
const resultClass = team.win ? "text-win" : "text-loss";
|
||||
|
||||
return (
|
||||
<div className="px-3 py-1.5 flex flex-wrap items-center justify-between gap-2 border-b border-base-content/10">
|
||||
@@ -639,7 +655,7 @@ function ParticipantRow({
|
||||
<div className="font-bold text-base-content">
|
||||
{participant.kills}
|
||||
<span className="text-base-content/25"> / </span>
|
||||
<span className="text-red-400">{participant.deaths}</span>
|
||||
<span className="text-loss">{participant.deaths}</span>
|
||||
<span className="text-base-content/25"> / </span>
|
||||
{participant.assists}
|
||||
</div>
|
||||
@@ -862,16 +878,34 @@ function RecentMatchCard({
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
const championName =
|
||||
championDisplayName(manifest, match.championId) ?? String(match.championId);
|
||||
const accent = match.win ? "border-l-blue-500" : "border-l-red-500";
|
||||
const resultClass = match.win ? "text-blue-400" : "text-red-400";
|
||||
const outcome = match.remake ? "remake" : match.win ? "win" : "loss";
|
||||
const surface = {
|
||||
win: "border-win-line bg-win-tint",
|
||||
loss: "border-loss-line bg-loss-tint",
|
||||
remake: "border-line bg-card",
|
||||
}[outcome];
|
||||
const bar = { win: "bg-win", loss: "bg-loss", remake: "bg-content-disabled" }[
|
||||
outcome
|
||||
];
|
||||
const resultClass = {
|
||||
win: "text-win",
|
||||
loss: "text-loss",
|
||||
remake: "text-content-muted",
|
||||
}[outcome];
|
||||
const toggleSurface = {
|
||||
win: "lg:bg-win/15 lg:text-win",
|
||||
loss: "lg:bg-loss/15 lg:text-loss",
|
||||
remake: "lg:bg-sunken-strong",
|
||||
}[outcome];
|
||||
|
||||
return (
|
||||
<article
|
||||
className={`border border-l-4 ${accent} border-base-content/10 bg-base-100`}
|
||||
className={`relative overflow-hidden rounded-box border ${surface}`}
|
||||
>
|
||||
<div className="p-3 grid lg:grid-cols-[120px_1fr_120px_1.5fr_40px] gap-3 items-center">
|
||||
<span aria-hidden="true" className={`absolute inset-y-0 left-0 w-1.5 ${bar}`} />
|
||||
<div className="grid items-center gap-3 py-3 pl-5 pr-3 lg:grid-cols-[112px_1fr_120px_1.5fr_36px] lg:pr-0">
|
||||
<div className="text-center lg:text-left">
|
||||
<div className={`text-sm font-bold ${resultClass}`}>
|
||||
<div className={`text-sm font-extrabold ${resultClass}`}>
|
||||
{match.remake ? "다시하기" : match.win ? "승리" : "패배"}
|
||||
</div>
|
||||
<div className="text-xs font-bold text-base-content/45 mt-1">
|
||||
@@ -912,7 +946,7 @@ function RecentMatchCard({
|
||||
<div className="text-lg font-bold tabular-nums">
|
||||
<span>{match.kills}</span>
|
||||
<span className="text-base-content/25"> / </span>
|
||||
<span className="text-red-400">{match.deaths}</span>
|
||||
<span className="text-loss">{match.deaths}</span>
|
||||
<span className="text-base-content/25"> / </span>
|
||||
<span>{match.assists}</span>
|
||||
</div>
|
||||
@@ -964,11 +998,11 @@ function RecentMatchCard({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-end">
|
||||
<div className="flex justify-end lg:-my-3 lg:self-stretch">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setExpanded((current) => !current)}
|
||||
className="flex h-10 w-full items-center justify-center gap-1 border border-base-content/10 text-base-content/35 transition-colors hover:text-base-content/70 sm:w-auto sm:px-3 lg:h-14 lg:w-8 lg:border-0 lg:px-0"
|
||||
className={`flex h-10 w-full items-center justify-center gap-1 rounded-field border border-line-strong bg-card text-content-muted transition-colors hover:text-content sm:w-auto sm:px-3 lg:h-full lg:w-9 lg:rounded-none lg:border-0 lg:px-0 ${toggleSurface}`}
|
||||
aria-expanded={expanded}
|
||||
aria-label={expanded ? "상세 전적 접기" : "상세 전적 펼치기"}
|
||||
>
|
||||
@@ -984,7 +1018,7 @@ function RecentMatchCard({
|
||||
</div>
|
||||
</div>
|
||||
{expanded && (
|
||||
<div className="border-t border-base-content/10 bg-base-200/30">
|
||||
<div className="border-t border-line bg-card">
|
||||
<MatchDetailTabs
|
||||
match={match}
|
||||
manifest={manifest}
|
||||
@@ -1098,6 +1132,7 @@ export default function UserHistoryPage() {
|
||||
const [refreshResult, setRefreshResult] =
|
||||
useState<ApiEnqueueRefreshResult | null>(null);
|
||||
const [refreshNotice, setRefreshNotice] = useState<string | null>(null);
|
||||
const view = searchParams.get("view") === "champions" ? "champions" : "matches";
|
||||
const queueGroupParam = searchParams.get("queueGroup");
|
||||
const rankParam = searchParams.get("rank");
|
||||
const queueGroup: RiotQueueGroup = isRiotQueueGroup(queueGroupParam)
|
||||
@@ -1292,7 +1327,7 @@ export default function UserHistoryPage() {
|
||||
if (!DEFAULT_COMMUNITY_ID) {
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 py-20 text-center">
|
||||
<span className="text-sm text-amber-600">
|
||||
<span className="text-sm text-gold">
|
||||
`VITE_DEFAULT_COMMUNITY_ID` 설정이 필요합니다.
|
||||
</span>
|
||||
</main>
|
||||
@@ -1305,12 +1340,17 @@ export default function UserHistoryPage() {
|
||||
|
||||
if (profileQuery.error || !profile) {
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 py-20 text-center">
|
||||
<h2 className="text-lg font-bold mb-2">소환사를 찾을 수 없습니다</h2>
|
||||
<Link to="/" className="btn btn-ghost btn-sm mt-4">
|
||||
홈으로 돌아가기
|
||||
</Link>
|
||||
</main>
|
||||
<PlainPage>
|
||||
<EmptyNote
|
||||
title="소환사를 찾을 수 없습니다"
|
||||
description="계정 연결이 해제됐거나 잘못된 주소일 수 있습니다."
|
||||
action={
|
||||
<Btn to="/" variant="secondary">
|
||||
내전 목록으로
|
||||
</Btn>
|
||||
}
|
||||
/>
|
||||
</PlainPage>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1319,86 +1359,77 @@ export default function UserHistoryPage() {
|
||||
Boolean(refreshNotice?.startsWith("갱신 실패"));
|
||||
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 sm:px-6 py-6">
|
||||
<Link
|
||||
to={backTo}
|
||||
className="inline-flex items-center gap-1 text-xs text-base-content/40 hover:text-base-content transition-colors mb-6"
|
||||
>
|
||||
← 이전으로
|
||||
</Link>
|
||||
|
||||
<section className="border border-base-content/10 bg-base-100 p-6 mb-6">
|
||||
<div className="flex flex-col sm:flex-row sm:items-center gap-4">
|
||||
<div className="w-16 h-16 bg-base-content/10 overflow-hidden shrink-0">
|
||||
<>
|
||||
<PageHero
|
||||
width="xl"
|
||||
crumbs={[{ label: "이전 화면", to: backTo }, { label: "소환사 전적" }]}
|
||||
media={
|
||||
<div className="relative shrink-0">
|
||||
<img
|
||||
src={profileIconUrl(ddragon, profile.profileIconId)}
|
||||
alt=""
|
||||
className="w-full h-full object-cover"
|
||||
className="size-[72px] rounded-2xl bg-ink-raised object-cover ring-2 ring-white/15 sm:size-[88px]"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<h1 className="text-2xl font-bold text-base-content">
|
||||
{profile.gameName}
|
||||
</h1>
|
||||
<span className="text-sm text-base-content/35">
|
||||
#{profile.tagLine}
|
||||
<span className="tabular absolute -bottom-2 left-1/2 -translate-x-1/2 rounded-full bg-ink-raised px-2 py-0.5 text-[11px] font-bold text-on-ink ring-1 ring-white/20">
|
||||
{profile.summonerLevel}
|
||||
</span>
|
||||
</div>
|
||||
<div className="mt-2 flex flex-wrap items-center gap-3 text-xs text-base-content/40">
|
||||
<span>Lv.{profile.summonerLevel}</span>
|
||||
}
|
||||
title={
|
||||
<>
|
||||
{profile.gameName}
|
||||
<span className="ml-1.5 text-lg font-semibold text-on-ink-muted">
|
||||
#{profile.tagLine}
|
||||
</span>
|
||||
</>
|
||||
}
|
||||
meta={
|
||||
<>
|
||||
<ResponsiveTierLabel tier={primaryTier} />
|
||||
<span>시즌: {profile.season.label}</span>
|
||||
<span>최근 저장: {formatLastFetched(profile.lastFetchedAt)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2 text-xs sm:items-end">
|
||||
<p className="text-base-content/35 sm:text-right">
|
||||
{isInternalQueue
|
||||
? "내전 기록이 안 보이면 다시 불러오세요."
|
||||
: "버튼을 누르면 최신 전적으로 갱신됩니다."}
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
className="bg-primary px-3 py-2 text-xs font-bold text-primary-content transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary disabled:opacity-40"
|
||||
<MetaDot />
|
||||
<span>{profile.season.label}</span>
|
||||
<MetaDot />
|
||||
<span>최근 갱신 {formatLastFetched(profile.lastFetchedAt)}</span>
|
||||
</>
|
||||
}
|
||||
actions={
|
||||
<Btn
|
||||
variant="primary"
|
||||
size="lg"
|
||||
disabled={refreshMutation.isPending || !userId}
|
||||
loading={refreshMutation.isPending}
|
||||
icon={<RefreshCw className="size-4" aria-hidden="true" />}
|
||||
onClick={handleRefresh}
|
||||
>
|
||||
{isInternalQueue
|
||||
? "내전 기록 다시 불러오기"
|
||||
: refreshMutation.isPending
|
||||
? "요청 중..."
|
||||
: "정보 갱신"}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{(refreshNotice || refreshSocket.error) && (
|
||||
<div
|
||||
className={`mt-4 border px-3 py-2 text-xs ${
|
||||
refreshNoticeIsError
|
||||
? "border-red-400/30 bg-red-400/5 text-red-300"
|
||||
: "border-primary/15 bg-primary/5 text-base-content/55"
|
||||
}`}
|
||||
>
|
||||
{refreshNotice ?? refreshSocket.error}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
{profile.tierHistory.length > 0 && (
|
||||
<Suspense
|
||||
fallback={
|
||||
<div className="mb-6 h-[180px] border border-base-content/10 bg-base-100" />
|
||||
{isInternalQueue ? "내전 기록 다시 불러오기" : "전적 갱신"}
|
||||
</Btn>
|
||||
}
|
||||
/>
|
||||
<PageBody width="xl" className="space-y-5">
|
||||
{(refreshNotice || refreshSocket.error) &&
|
||||
(refreshNoticeIsError ? (
|
||||
<ErrorNote
|
||||
title="전적을 갱신하지 못했습니다"
|
||||
description={refreshNotice ?? refreshSocket.error}
|
||||
/>
|
||||
) : (
|
||||
<div
|
||||
role="status"
|
||||
className="lts-panel flex items-center gap-2 px-4 py-3 text-sm text-content-muted"
|
||||
>
|
||||
<TierHistoryChart entries={profile.tierHistory} />
|
||||
</Suspense>
|
||||
)}
|
||||
<RefreshCw className="size-4 text-primary" aria-hidden="true" />
|
||||
{refreshNotice}
|
||||
</div>
|
||||
))}
|
||||
|
||||
<section className="border border-base-content/10 bg-base-100 mb-6">
|
||||
<div className="flex flex-wrap border-b border-base-content/8">
|
||||
<div className="lts-panel sticky top-[60px] z-30 p-1">
|
||||
<div
|
||||
className="no-scrollbar flex gap-1 overflow-x-auto"
|
||||
role="tablist"
|
||||
aria-label="게임 모드"
|
||||
>
|
||||
{QUEUE_GROUP_TABS.map((tab) => (
|
||||
<FilterButton
|
||||
<QueueTab
|
||||
key={tab.value}
|
||||
active={queueGroup === tab.value}
|
||||
onClick={() =>
|
||||
@@ -1406,45 +1437,57 @@ export default function UserHistoryPage() {
|
||||
}
|
||||
>
|
||||
{tab.label}
|
||||
</FilterButton>
|
||||
</QueueTab>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex flex-wrap items-center justify-between gap-3 px-3 py-2">
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap items-center justify-between gap-3">
|
||||
{!isInternalQueue ? (
|
||||
<div className="flex flex-wrap">
|
||||
<div
|
||||
className="flex flex-wrap gap-1.5"
|
||||
role="group"
|
||||
aria-label="큐 종류"
|
||||
>
|
||||
{RANK_FILTER_TABS.map((tab) => (
|
||||
<FilterButton
|
||||
<Chip
|
||||
key={tab.value}
|
||||
active={rank === tab.value}
|
||||
selected={rank === tab.value}
|
||||
onClick={() =>
|
||||
updateSearch({ rank: tab.value, championId: null })
|
||||
}
|
||||
>
|
||||
{tab.label}
|
||||
</FilterButton>
|
||||
</Chip>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="px-3 py-2 text-xs text-base-content/40">
|
||||
내전 탭은 토너먼트 코드 결과 수집 데이터를 기준으로 집계합니다.
|
||||
</div>
|
||||
<p className="text-[13px] text-content-muted">
|
||||
토너먼트 코드로 수집한 내전 결과만 집계합니다.
|
||||
</p>
|
||||
)}
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
{selectedChampionName && (
|
||||
<button
|
||||
type="button"
|
||||
className="text-xs px-2.5 py-1 border border-primary/30 text-primary bg-primary/5"
|
||||
<Chip
|
||||
selected
|
||||
onClick={() => updateSearch({ championId: null })}
|
||||
aria-label={`${selectedChampionName} 필터 해제`}
|
||||
>
|
||||
{selectedChampionName} 필터 해제
|
||||
</button>
|
||||
{selectedChampionName}
|
||||
<X className="size-3.5" aria-hidden="true" />
|
||||
</Chip>
|
||||
)}
|
||||
{profile.seasons.length > 0 && (
|
||||
<select
|
||||
aria-label="시즌"
|
||||
value={filters.seasonId ?? profile.season.id}
|
||||
onChange={(event) =>
|
||||
updateSearch({ seasonId: event.target.value, championId: null })
|
||||
updateSearch({
|
||||
seasonId: event.target.value,
|
||||
championId: null,
|
||||
})
|
||||
}
|
||||
className="border border-base-content/10 bg-transparent px-3 py-2 text-xs"
|
||||
className="lts-select !w-auto"
|
||||
>
|
||||
{profile.seasons.map((season) => (
|
||||
<option key={season.id} value={season.id}>
|
||||
@@ -1454,26 +1497,39 @@ export default function UserHistoryPage() {
|
||||
</select>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section className="mb-6">
|
||||
<h2 className="text-sm font-bold text-base-content mb-3">
|
||||
최근 {summary?.windowSize ?? 20}게임 전적 요약
|
||||
</h2>
|
||||
<div className="grid sm:grid-cols-2 lg:grid-cols-5 gap-3">
|
||||
{profile.tierHistory.length > 0 && !isInternalQueue && (
|
||||
<Suspense fallback={<div className="lts-panel h-[180px]" />}>
|
||||
<TierHistoryChart entries={profile.tierHistory} />
|
||||
</Suspense>
|
||||
)}
|
||||
|
||||
<Panel>
|
||||
<PanelHeader
|
||||
title={`최근 ${summary?.windowSize ?? 20}게임 요약`}
|
||||
description={
|
||||
selectedChampionName
|
||||
? `${selectedChampionName} 경기만 집계`
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
<div className="grid grid-cols-2 divide-line max-lg:[&>*:nth-child(n+3)]:border-t max-lg:[&>*:nth-child(even)]:border-l lg:grid-cols-[repeat(4,minmax(0,1fr))_minmax(0,1.5fr)] lg:divide-x">
|
||||
<SummaryCard
|
||||
label="승률"
|
||||
value={`${summary?.winRate ?? 0}%`}
|
||||
value={summary ? `${summary.winRate}%` : "—"}
|
||||
valueClassName={summary ? ratioClass(summary.winRate) : undefined}
|
||||
sub={`${summary?.wins ?? 0}승 ${summary?.losses ?? 0}패`}
|
||||
/>
|
||||
<SummaryCard
|
||||
label="KDA"
|
||||
value={summary?.kda ?? 0}
|
||||
value={summary?.kda ?? "—"}
|
||||
valueClassName={summary ? kdaClass(summary.kda) : undefined}
|
||||
sub={`${summary?.avgKills ?? 0} / ${summary?.avgDeaths ?? 0} / ${summary?.avgAssists ?? 0}`}
|
||||
/>
|
||||
<SummaryCard
|
||||
label="최고 평점"
|
||||
value={summary?.bestRating?.rating ?? "-"}
|
||||
value={summary?.bestRating?.rating ?? "—"}
|
||||
sub={
|
||||
summary?.bestRating
|
||||
? `${summary.bestRating.kills}/${summary.bestRating.deaths}/${summary.bestRating.assists}`
|
||||
@@ -1481,24 +1537,32 @@ export default function UserHistoryPage() {
|
||||
}
|
||||
/>
|
||||
<SummaryCard
|
||||
label="연승/연패"
|
||||
label="흐름"
|
||||
value={
|
||||
summary?.streak
|
||||
? `${summary.streak.count}${summary.streak.type === "win" ? "연승" : "연패"}`
|
||||
: "-"
|
||||
: "—"
|
||||
}
|
||||
valueClassName={
|
||||
summary?.streak
|
||||
? summary.streak.type === "win"
|
||||
? "text-win"
|
||||
: "text-loss"
|
||||
: undefined
|
||||
}
|
||||
sub="가장 최근 경기 기준"
|
||||
/>
|
||||
<div className="border border-base-content/8 bg-base-100 p-4">
|
||||
<div className="text-xs font-bold uppercase tracking-wider text-base-content/30">
|
||||
<div className="col-span-2 px-4 py-3.5 sm:px-5 lg:col-span-1">
|
||||
<div className="text-xs font-semibold text-content-subtle">
|
||||
자주 플레이한 챔피언
|
||||
</div>
|
||||
<div className="mt-3 flex items-center gap-3">
|
||||
<div className="mt-2 flex items-center gap-4">
|
||||
{(summary?.topChampions ?? []).map((champion) => (
|
||||
<button
|
||||
type="button"
|
||||
key={champion.championId}
|
||||
className="text-center group"
|
||||
className="group flex items-center gap-2 text-left"
|
||||
aria-label={`${championDisplayName(ddragon, champion.championId) ?? champion.championId} 경기만 보기`}
|
||||
onClick={() =>
|
||||
updateSearch({ championId: champion.championId })
|
||||
}
|
||||
@@ -1506,25 +1570,55 @@ export default function UserHistoryPage() {
|
||||
<ChampionIcon
|
||||
championId={champion.championId}
|
||||
manifest={ddragon}
|
||||
className="rounded-full ring-2 ring-transparent transition-shadow group-hover:ring-primary"
|
||||
/>
|
||||
<div className="mt-1 text-xs text-base-content/40 group-hover:text-primary">
|
||||
<span
|
||||
className={`tabular text-sm font-bold ${ratioClass(champion.winRate)}`}
|
||||
>
|
||||
{champion.winRate}%
|
||||
</div>
|
||||
</span>
|
||||
</button>
|
||||
))}
|
||||
{(summary?.topChampions ?? []).length === 0 && (
|
||||
<span className="text-xs text-base-content/25">기록 없음</span>
|
||||
<span className="text-xs text-content-subtle">기록 없음</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</Panel>
|
||||
|
||||
<section className="mb-6">
|
||||
<div
|
||||
className="flex items-center gap-1.5"
|
||||
role="tablist"
|
||||
aria-label="전적 보기"
|
||||
>
|
||||
<Chip
|
||||
role="tab"
|
||||
aria-selected={view === "matches"}
|
||||
selected={view === "matches"}
|
||||
onClick={() => updateSearch({ view: null })}
|
||||
>
|
||||
매치 히스토리
|
||||
</Chip>
|
||||
<Chip
|
||||
role="tab"
|
||||
aria-selected={view === "champions"}
|
||||
selected={view === "champions"}
|
||||
onClick={() => updateSearch({ view: "champions" })}
|
||||
>
|
||||
챔피언 통계
|
||||
</Chip>
|
||||
<span className="ml-auto text-xs text-content-subtle">
|
||||
최근 저장 {formatLastFetched(historyLastFetchedAt)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{view === "champions" && (
|
||||
<section>
|
||||
<div className="flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3 mb-3">
|
||||
<div>
|
||||
<h2 className="text-sm font-bold text-base-content">챔피언 통계</h2>
|
||||
<p className="mt-1 text-xs text-base-content/35">
|
||||
<h2 className="sr-only">챔피언 통계</h2>
|
||||
<p className="text-xs text-content-subtle">
|
||||
저장된 데이터를 기준으로 집계합니다. 최신 데이터가 반영되지 않을
|
||||
수 있습니다.
|
||||
</p>
|
||||
@@ -1534,14 +1628,14 @@ export default function UserHistoryPage() {
|
||||
value={championSearch}
|
||||
onChange={(event) => setChampionSearch(event.target.value)}
|
||||
placeholder="챔피언 검색"
|
||||
className="border border-base-content/10 bg-transparent px-3 py-2 text-xs focus:outline-none focus:border-primary/30"
|
||||
className="lts-input"
|
||||
/>
|
||||
<select
|
||||
value={sortKey}
|
||||
onChange={(event) =>
|
||||
setSortKey(event.target.value as ChampionSortKey)
|
||||
}
|
||||
className="border border-base-content/10 bg-transparent px-3 py-2 text-xs"
|
||||
className="lts-select"
|
||||
>
|
||||
{(Object.keys(SORT_LABELS) as ChampionSortKey[]).map((key) => (
|
||||
<option key={key} value={key}>
|
||||
@@ -1561,20 +1655,21 @@ export default function UserHistoryPage() {
|
||||
/>
|
||||
</section>
|
||||
|
||||
)}
|
||||
|
||||
{view === "matches" && (
|
||||
<section>
|
||||
<div className="flex items-center justify-between gap-3 mb-3">
|
||||
<h2 className="text-sm font-bold text-base-content">매치 히스토리</h2>
|
||||
<span className="text-xs text-base-content/35">
|
||||
최근 저장: {formatLastFetched(historyLastFetchedAt)}
|
||||
</span>
|
||||
</div>
|
||||
<h2 className="sr-only">매치 히스토리</h2>
|
||||
|
||||
{matchesLoading ? (
|
||||
<MatchListSkeleton />
|
||||
) : matches.length === 0 ? (
|
||||
<div className="border border-base-content/10 bg-base-100 px-4 py-10 text-center text-sm text-base-content/35">
|
||||
조건에 맞는 최근 경기 기록이 없습니다.
|
||||
</div>
|
||||
<Panel>
|
||||
<EmptyNote
|
||||
title="조건에 맞는 경기 기록이 없습니다"
|
||||
description="큐 종류나 시즌을 바꾸거나 전적을 갱신해 보세요."
|
||||
/>
|
||||
</Panel>
|
||||
) : (
|
||||
<div className="space-y-2">
|
||||
{matches.map((match) => (
|
||||
@@ -1591,20 +1686,24 @@ export default function UserHistoryPage() {
|
||||
)}
|
||||
|
||||
{hasNextPage && (
|
||||
<button
|
||||
type="button"
|
||||
className="mt-3 w-full border border-base-content/15 bg-base-100 py-3 text-sm font-bold text-base-content/60 hover:border-primary/30 hover:text-primary disabled:opacity-40"
|
||||
<Btn
|
||||
variant="secondary"
|
||||
size="lg"
|
||||
className="mt-3 w-full"
|
||||
disabled={isFetchingNextPage}
|
||||
loading={isFetchingNextPage}
|
||||
onClick={() =>
|
||||
isInternalQueue
|
||||
? internalHistoryQuery.fetchNextPage()
|
||||
: recentMatchesQuery.fetchNextPage()
|
||||
}
|
||||
>
|
||||
{isFetchingNextPage ? "불러오는 중..." : "+ 더 보기"}
|
||||
</button>
|
||||
더 보기
|
||||
</Btn>
|
||||
)}
|
||||
</section>
|
||||
</main>
|
||||
)}
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useMemo, useState } from 'react';
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import { Link, useParams } from 'react-router';
|
||||
import { useParams } from 'react-router';
|
||||
import {
|
||||
useCancelLegacyImport,
|
||||
useLegacyImportJobs,
|
||||
@@ -15,6 +15,8 @@ import type {
|
||||
} from '../../api/types';
|
||||
import { DEFAULT_COMMUNITY_ID } from '../../config';
|
||||
|
||||
import { Btn } from "../../ui/Btn";
|
||||
import { AdminNotice, AdminPage } from '../../components/AdminPage';
|
||||
const DEFAULT_START = '2024-05-01T00:00:00.000Z';
|
||||
|
||||
type MemberWindowOverride = { startTime: string; endTime: string };
|
||||
@@ -91,14 +93,13 @@ function JobCard({
|
||||
</div>
|
||||
</div>
|
||||
{running && (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-ghost btn-xs px-3 text-red-400"
|
||||
<Btn
|
||||
variant="ghost" size="sm"
|
||||
disabled={cancelling}
|
||||
onClick={() => onCancel(job.jobId)}
|
||||
>
|
||||
취소
|
||||
</button>
|
||||
</Btn>
|
||||
)}
|
||||
</div>
|
||||
<div className="mt-3 h-2 bg-base-content/8">
|
||||
@@ -206,64 +207,52 @@ export default function LegacyImportPage() {
|
||||
|
||||
if (!communityId) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">커뮤니티 설정이 필요합니다</h1>
|
||||
</main>
|
||||
<AdminNotice title="커뮤니티 설정이 필요합니다" />
|
||||
);
|
||||
}
|
||||
|
||||
if (meQuery.isPending) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">권한 확인 중...</h1>
|
||||
</main>
|
||||
<AdminNotice title="권한 확인 중..." />
|
||||
);
|
||||
}
|
||||
|
||||
if (!canManage) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">권한이 필요합니다</h1>
|
||||
<AdminNotice title="권한이 필요합니다">
|
||||
<p className="mt-2 text-sm text-base-content/40">
|
||||
Legacy 백필은 owner/admin만 실행할 수 있습니다.
|
||||
</p>
|
||||
{manageableMemberships.length > 0 && (
|
||||
<div className="mt-5 flex flex-wrap justify-center gap-2">
|
||||
{manageableMemberships.map((membership) => (
|
||||
<Link
|
||||
<Btn
|
||||
key={membership.community?._id ?? membership.user._id}
|
||||
to={`/admin/communities/${membership.community?._id}/legacy-import`}
|
||||
className="btn btn-primary btn-sm px-4 text-xs"
|
||||
variant="primary"
|
||||
>
|
||||
{membership.community?.name ?? '관리 가능한 커뮤니티'}로 이동
|
||||
</Link>
|
||||
</Btn>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
</AdminNotice>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 sm:px-6 py-6">
|
||||
<Link to="/" className="inline-flex text-xs text-base-content/40 hover:text-base-content mb-5">
|
||||
← 목록으로
|
||||
</Link>
|
||||
<div className="mb-6 flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3">
|
||||
<div>
|
||||
<h1 className="text-2xl font-black text-base-content">
|
||||
Legacy 내전 백필
|
||||
</h1>
|
||||
<p className="mt-1 text-sm text-base-content/45">
|
||||
커뮤니티 멤버 PUUID로 과거 `type=tourney` 매치를 찾아 내전 기록으로 import합니다.
|
||||
</p>
|
||||
</div>
|
||||
<Link
|
||||
<AdminPage
|
||||
communityId={communityId}
|
||||
title="Legacy 내전 백필"
|
||||
description="커뮤니티 멤버 PUUID로 과거 type=tourney 매치를 찾아 내전 기록으로 import합니다."
|
||||
>
|
||||
<div className="mb-4 flex flex-wrap items-center justify-end gap-2">
|
||||
<Btn
|
||||
to={`/admin/communities/${communityId}/legacy-matches`}
|
||||
className="btn btn-ghost btn-sm px-4 text-xs"
|
||||
variant="ghost"
|
||||
>
|
||||
Legacy 매치 정리
|
||||
</Link>
|
||||
</Btn>
|
||||
</div>
|
||||
|
||||
<section className="border border-base-content/10 bg-base-100 p-4 mb-6">
|
||||
@@ -275,7 +264,7 @@ export default function LegacyImportPage() {
|
||||
type="datetime-local"
|
||||
value={windowStart}
|
||||
onChange={(event) => setWindowStart(event.target.value)}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-xs"
|
||||
className="lts-input mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<label className="text-xs text-base-content/45">
|
||||
@@ -285,12 +274,11 @@ export default function LegacyImportPage() {
|
||||
value={windowEnd}
|
||||
onChange={(event) => setWindowEnd(event.target.value)}
|
||||
placeholder="비우면 지금"
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-xs"
|
||||
className="lts-input mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm px-5 text-xs"
|
||||
<Btn
|
||||
variant="primary"
|
||||
disabled={startMutation.isPending || Boolean(runningJob)}
|
||||
onClick={handleStart}
|
||||
>
|
||||
@@ -299,7 +287,7 @@ export default function LegacyImportPage() {
|
||||
: startMutation.isPending
|
||||
? '시작 중...'
|
||||
: '백필 시작'}
|
||||
</button>
|
||||
</Btn>
|
||||
</div>
|
||||
{message && (
|
||||
<div className="mt-3 border border-primary/15 bg-primary/5 px-3 py-2 text-xs text-base-content/55">
|
||||
@@ -317,7 +305,7 @@ export default function LegacyImportPage() {
|
||||
</p>
|
||||
</div>
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full min-w-[900px] text-left">
|
||||
<table className="lts-table min-w-[900px]">
|
||||
<thead>
|
||||
<tr className="bg-base-200/40 border-b border-base-content/10 text-xs uppercase tracking-wider text-base-content/35">
|
||||
<th className="px-3 py-2">멤버</th>
|
||||
@@ -363,7 +351,7 @@ export default function LegacyImportPage() {
|
||||
};
|
||||
})
|
||||
}
|
||||
className="border border-base-content/10 bg-transparent px-2 py-1 text-xs"
|
||||
className="lts-input"
|
||||
/>
|
||||
</td>
|
||||
<td className="px-3 py-2">
|
||||
@@ -384,7 +372,7 @@ export default function LegacyImportPage() {
|
||||
};
|
||||
})
|
||||
}
|
||||
className="border border-base-content/10 bg-transparent px-2 py-1 text-xs"
|
||||
className="lts-input"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -422,6 +410,6 @@ export default function LegacyImportPage() {
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
</main>
|
||||
</AdminPage>
|
||||
);
|
||||
}
|
||||
@@ -12,6 +12,8 @@ import type { LegacyMatchListItem } from '../../api/types';
|
||||
import { DEFAULT_COMMUNITY_ID } from '../../config';
|
||||
import { teamIndexLabel } from '../../lib/league';
|
||||
|
||||
import { Btn } from "../../ui/Btn";
|
||||
import { AdminNotice, AdminPage } from '../../components/AdminPage';
|
||||
function formatDate(value: string) {
|
||||
return new Intl.DateTimeFormat('ko-KR', {
|
||||
year: 'numeric',
|
||||
@@ -74,52 +76,36 @@ export default function LegacyMatchesPage() {
|
||||
|
||||
if (!communityId) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">커뮤니티 설정이 필요합니다</h1>
|
||||
</main>
|
||||
<AdminNotice title="커뮤니티 설정이 필요합니다" />
|
||||
);
|
||||
}
|
||||
|
||||
if (meQuery.isPending) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">권한 확인 중...</h1>
|
||||
</main>
|
||||
<AdminNotice title="권한 확인 중..." />
|
||||
);
|
||||
}
|
||||
|
||||
if (!canManage) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">권한이 필요합니다</h1>
|
||||
<AdminNotice title="권한이 필요합니다">
|
||||
<p className="mt-2 text-sm text-base-content/40">
|
||||
Legacy 매치 정리는 owner/admin만 사용할 수 있습니다.
|
||||
</p>
|
||||
</main>
|
||||
</AdminNotice>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 sm:px-6 py-6">
|
||||
<Link
|
||||
to={`/admin/communities/${communityId}/legacy-import`}
|
||||
className="inline-flex text-xs text-base-content/40 hover:text-base-content mb-5"
|
||||
<AdminPage
|
||||
communityId={communityId}
|
||||
title="Legacy 매치 정리"
|
||||
description="백필로 들어온 매치를 확인하고 외부 토너먼트 기록을 삭제할 수 있습니다."
|
||||
>
|
||||
← Legacy 백필
|
||||
</Link>
|
||||
<div className="mb-6 flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3">
|
||||
<div>
|
||||
<h1 className="text-2xl font-black text-base-content">
|
||||
Legacy 매치 정리
|
||||
</h1>
|
||||
<p className="mt-1 text-sm text-base-content/45">
|
||||
백필로 들어온 매치를 확인하고 외부 토너먼트 기록을 삭제할 수 있습니다.
|
||||
</p>
|
||||
</div>
|
||||
<div className="mb-4 flex flex-wrap items-center justify-end gap-2">
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm px-4 text-xs"
|
||||
<Btn
|
||||
variant="primary"
|
||||
disabled={rebuildMutation.isPending}
|
||||
onClick={() => {
|
||||
if (!window.confirm('현재 가입자 기준으로 과거 매치를 재구성할까요?')) {
|
||||
@@ -129,10 +115,9 @@ export default function LegacyMatchesPage() {
|
||||
}}
|
||||
>
|
||||
{rebuildMutation.isPending ? '재구성 중...' : '과거 데이터 재구성'}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-ghost btn-sm px-4 text-xs text-red-400"
|
||||
</Btn>
|
||||
<Btn
|
||||
variant="ghost"
|
||||
disabled={selectedIds.length === 0 || bulkDeleteMutation.isPending}
|
||||
onClick={() => {
|
||||
if (!window.confirm(`${selectedIds.length}개 매치를 삭제할까요?`)) return;
|
||||
@@ -145,7 +130,7 @@ export default function LegacyMatchesPage() {
|
||||
}}
|
||||
>
|
||||
선택 삭제 ({selectedIds.length})
|
||||
</button>
|
||||
</Btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -157,9 +142,9 @@ export default function LegacyMatchesPage() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<section className="border border-base-content/10 bg-base-100 overflow-hidden">
|
||||
<section className="lts-panel overflow-hidden">
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full min-w-[900px] text-left">
|
||||
<table className="lts-table min-w-[900px]">
|
||||
<thead>
|
||||
<tr className="bg-base-200/40 border-b border-base-content/10 text-xs uppercase tracking-wider text-base-content/35">
|
||||
<th className="px-3 py-2 w-8">
|
||||
@@ -218,7 +203,7 @@ export default function LegacyMatchesPage() {
|
||||
<td className="px-3 py-2 text-right">
|
||||
<button
|
||||
type="button"
|
||||
className="text-xs px-2 py-1 border border-red-500/20 text-red-400 hover:bg-red-500/10"
|
||||
className="text-xs px-2 py-1 border border-loss-line text-loss hover:bg-loss-tint"
|
||||
disabled={deleteMutation.isPending}
|
||||
onClick={() => {
|
||||
if (!window.confirm('이 매치를 삭제할까요?')) return;
|
||||
@@ -254,6 +239,6 @@ export default function LegacyMatchesPage() {
|
||||
{matchesQuery.isFetchingNextPage ? '불러오는 중...' : '+ 더 보기'}
|
||||
</button>
|
||||
)}
|
||||
</main>
|
||||
</AdminPage>
|
||||
);
|
||||
}
|
||||
@@ -16,6 +16,8 @@ import {
|
||||
import type { MatchMutationRequest } from '../../api/types';
|
||||
import { DEFAULT_COMMUNITY_ID } from '../../config';
|
||||
|
||||
import { Btn } from "../../ui/Btn";
|
||||
import { AdminNotice, AdminPage } from '../../components/AdminPage';
|
||||
const DEFAULT_FORM: MatchMutationRequest = {
|
||||
title: '',
|
||||
description: '',
|
||||
@@ -246,30 +248,24 @@ export default function MatchAdminPage() {
|
||||
|
||||
if (!canManage && !meQuery.isPending) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">권한이 필요합니다</h1>
|
||||
<AdminNotice title="권한이 필요합니다">
|
||||
<p className="mt-2 text-sm text-base-content/40">
|
||||
내전 관리는 owner/admin만 사용할 수 있습니다.
|
||||
</p>
|
||||
</main>
|
||||
</AdminNotice>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 sm:px-6 py-6">
|
||||
<Link to="/" className="inline-flex text-xs text-base-content/40 hover:text-base-content mb-5">
|
||||
← 목록으로
|
||||
</Link>
|
||||
<div className="mb-6 flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3">
|
||||
<div>
|
||||
<h1 className="text-2xl font-black text-base-content">내전 관리</h1>
|
||||
<p className="mt-1 text-sm text-base-content/45">
|
||||
내전 생성, 모집 정원, 게임 모드와 공지 내용을 관리합니다.
|
||||
</p>
|
||||
</div>
|
||||
<button type="button" className="btn btn-primary btn-sm px-5 text-xs" onClick={openCreate}>
|
||||
<AdminPage
|
||||
communityId={communityId}
|
||||
title="내전 관리"
|
||||
description="내전 생성, 모집 정원, 게임 모드와 공지 내용을 관리합니다."
|
||||
>
|
||||
<div className="mb-4 flex flex-wrap items-center justify-end gap-2">
|
||||
<Btn variant="primary" onClick={openCreate}>
|
||||
새 내전 만들기
|
||||
</button>
|
||||
</Btn>
|
||||
</div>
|
||||
|
||||
{message && (
|
||||
@@ -301,7 +297,7 @@ export default function MatchAdminPage() {
|
||||
required
|
||||
value={form.title}
|
||||
onChange={(event) => setForm((current) => ({ ...current, title: event.target.value }))}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-input mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<label className="text-xs text-base-content/45 md:col-span-2">
|
||||
@@ -311,7 +307,7 @@ export default function MatchAdminPage() {
|
||||
value={form.description}
|
||||
onChange={(event) => setForm((current) => ({ ...current, description: event.target.value }))}
|
||||
rows={3}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-textarea mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<label className="text-xs text-base-content/45">
|
||||
@@ -322,7 +318,7 @@ export default function MatchAdminPage() {
|
||||
type="datetime-local"
|
||||
value={form.scheduledAt}
|
||||
onChange={(event) => setForm((current) => ({ ...current, scheduledAt: event.target.value }))}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-input mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<label className="text-xs text-base-content/45">
|
||||
@@ -340,7 +336,7 @@ export default function MatchAdminPage() {
|
||||
),
|
||||
}));
|
||||
}}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-select mt-1 w-full"
|
||||
>
|
||||
{(form.gameMode === 'double-elimination'
|
||||
? [20, 40]
|
||||
@@ -358,7 +354,7 @@ export default function MatchAdminPage() {
|
||||
step={form.gameMode === 'double-elimination' ? 2 : 1}
|
||||
value={form.gameCount}
|
||||
onChange={(event) => setForm((current) => ({ ...current, gameCount: Number(event.target.value) }))}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-input mt-1 w-full"
|
||||
/>
|
||||
{form.gameMode === 'double-elimination' && (
|
||||
<span className="mt-1 block text-xs text-base-content/30">
|
||||
@@ -388,13 +384,13 @@ export default function MatchAdminPage() {
|
||||
: current.gameCount,
|
||||
}));
|
||||
}}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-select mt-1 w-full"
|
||||
>
|
||||
{Object.entries(GAME_MODE_LABEL).map(([value, label]) => (
|
||||
<option key={value} value={value}>{label}</option>
|
||||
))}
|
||||
</select>
|
||||
<span className="mt-1 block text-xs text-amber-500/80">
|
||||
<span className="mt-1 block text-xs text-gold">
|
||||
현재 경매/코드 연결은 페어 방식 기준으로 동작합니다.
|
||||
</span>
|
||||
</label>
|
||||
@@ -417,7 +413,7 @@ export default function MatchAdminPage() {
|
||||
: Number(event.target.value),
|
||||
}))
|
||||
}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-input mt-1 w-full"
|
||||
/>
|
||||
<span className="mt-1 block text-xs text-base-content/30">
|
||||
비워두면 전체 {roundRobinFullRoundCount}라운드로 생성됩니다.
|
||||
@@ -446,7 +442,7 @@ export default function MatchAdminPage() {
|
||||
value={form.prizesText}
|
||||
onChange={(event) => setForm((current) => ({ ...current, prizesText: event.target.value }))}
|
||||
rows={4}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-textarea mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<label className="text-xs text-base-content/45">
|
||||
@@ -455,7 +451,7 @@ export default function MatchAdminPage() {
|
||||
value={form.noticesText}
|
||||
onChange={(event) => setForm((current) => ({ ...current, noticesText: event.target.value }))}
|
||||
rows={4}
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm"
|
||||
className="lts-textarea mt-1 w-full"
|
||||
/>
|
||||
</label>
|
||||
<label className="text-xs text-base-content/45 md:col-span-2">
|
||||
@@ -465,34 +461,32 @@ export default function MatchAdminPage() {
|
||||
onChange={(event) => setForm((current) => ({ ...current, scheduleText: event.target.value }))}
|
||||
rows={3}
|
||||
placeholder="20:50|로비 오픈"
|
||||
className="mt-1 w-full border border-base-content/10 bg-transparent px-3 py-2 text-sm font-mono"
|
||||
className="lts-textarea mt-1 w-full font-mono"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="mt-4 flex gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm px-5 text-xs"
|
||||
<Btn
|
||||
variant="primary"
|
||||
disabled={createMutation.isPending || updateMutation.isPending}
|
||||
onClick={submit}
|
||||
>
|
||||
{editing ? '수정 저장' : '생성'}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-ghost btn-sm px-5 text-xs"
|
||||
</Btn>
|
||||
<Btn
|
||||
variant="ghost"
|
||||
onClick={() => setShowForm(false)}
|
||||
>
|
||||
취소
|
||||
</button>
|
||||
</Btn>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
<section className="border border-base-content/10 bg-base-100 overflow-hidden">
|
||||
<section className="lts-panel overflow-hidden">
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full min-w-[900px] text-left">
|
||||
<table className="lts-table min-w-[900px]">
|
||||
<thead>
|
||||
<tr className="bg-base-200/40 border-b border-base-content/10 text-xs uppercase tracking-wider text-base-content/35">
|
||||
<th className="px-3 py-2">시간</th>
|
||||
@@ -549,7 +543,7 @@ export default function MatchAdminPage() {
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="text-xs px-2 py-1 border border-red-500/20 text-red-400 hover:bg-red-500/10"
|
||||
className="text-xs px-2 py-1 border border-loss-line text-loss hover:bg-loss-tint"
|
||||
disabled={
|
||||
deleteMutation.isPending ||
|
||||
match.status !== 'recruiting'
|
||||
@@ -585,6 +579,6 @@ export default function MatchAdminPage() {
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</AdminPage>
|
||||
);
|
||||
}
|
||||
@@ -15,6 +15,8 @@ import type {
|
||||
} from '../../api/types';
|
||||
import { DEFAULT_COMMUNITY_ID } from '../../config';
|
||||
|
||||
import { Btn } from "../../ui/Btn";
|
||||
import { AdminNotice, AdminPage } from '../../components/AdminPage';
|
||||
const STATES: TournamentCodeState[] = [
|
||||
'available',
|
||||
'reserved',
|
||||
@@ -135,67 +137,54 @@ export default function TournamentCodesPage() {
|
||||
|
||||
if (!communityId) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">커뮤니티 설정이 필요합니다</h1>
|
||||
<AdminNotice title="커뮤니티 설정이 필요합니다">
|
||||
<p className="mt-2 text-sm text-base-content/40">
|
||||
`VITE_DEFAULT_COMMUNITY_ID`를 설정하거나 올바른 커뮤니티 경로로
|
||||
접속해주세요.
|
||||
</p>
|
||||
</main>
|
||||
</AdminNotice>
|
||||
);
|
||||
}
|
||||
|
||||
if (meQuery.isPending) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">권한 확인 중...</h1>
|
||||
<AdminNotice title="권한 확인 중...">
|
||||
<p className="mt-2 text-sm text-base-content/40">
|
||||
로그인한 계정의 커뮤니티 권한을 확인하고 있습니다.
|
||||
</p>
|
||||
</main>
|
||||
</AdminNotice>
|
||||
);
|
||||
}
|
||||
|
||||
if (!canManage) {
|
||||
return (
|
||||
<main className="max-w-5xl mx-auto px-4 py-20 text-center">
|
||||
<h1 className="text-lg font-bold">권한이 필요합니다</h1>
|
||||
<AdminNotice title="권한이 필요합니다">
|
||||
<p className="mt-2 text-sm text-base-content/40">
|
||||
토너먼트 코드 풀은 owner/admin만 관리할 수 있습니다.
|
||||
</p>
|
||||
{manageableMemberships.length > 0 && (
|
||||
<div className="mt-5 flex flex-wrap justify-center gap-2">
|
||||
{manageableMemberships.map((membership) => (
|
||||
<Link
|
||||
<Btn
|
||||
key={membership.community?._id ?? membership.user._id}
|
||||
to={`/admin/communities/${membership.community?._id}/tournament-codes`}
|
||||
className="btn btn-primary btn-sm px-4 text-xs"
|
||||
variant="primary"
|
||||
>
|
||||
{membership.community?.name ?? '관리 가능한 커뮤니티'}로 이동
|
||||
</Link>
|
||||
</Btn>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
</AdminNotice>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="max-w-6xl mx-auto px-4 sm:px-6 py-6">
|
||||
<Link
|
||||
to="/"
|
||||
className="inline-flex text-xs text-base-content/40 hover:text-base-content mb-5"
|
||||
<AdminPage
|
||||
communityId={communityId}
|
||||
title="토너먼트 코드 풀"
|
||||
description="외부에서 생성한 코드를 업로드하고, 매치에 자동 할당되는 풀을 관리합니다."
|
||||
>
|
||||
← 목록으로
|
||||
</Link>
|
||||
<div className="mb-6">
|
||||
<h1 className="text-2xl font-black text-base-content">
|
||||
토너먼트 코드 풀
|
||||
</h1>
|
||||
<p className="mt-1 text-sm text-base-content/45">
|
||||
외부에서 생성한 코드를 업로드하고, 매치에 자동 할당되는 풀을 관리합니다.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section className="grid sm:grid-cols-5 gap-3 mb-6">
|
||||
{STATES.map((state) => (
|
||||
@@ -239,28 +228,27 @@ export default function TournamentCodesPage() {
|
||||
? 'KR-ABCD-1234,2026-05-30T18:00:00Z,메모'
|
||||
: '[{"code":"KR-ABCD-1234","expiresAt":"2026-05-30T18:00:00Z","source":"external"}]'
|
||||
}
|
||||
className="w-full border border-base-content/10 bg-transparent p-3 text-xs font-mono focus:outline-none focus:border-primary/30"
|
||||
className="lts-textarea w-full font-mono"
|
||||
/>
|
||||
<div className="mt-3 flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm px-5 text-xs"
|
||||
<Btn
|
||||
variant="primary"
|
||||
disabled={uploadMutation.isPending || !text.trim()}
|
||||
onClick={handleUpload}
|
||||
>
|
||||
{uploadMutation.isPending ? '업로드 중...' : '업로드'}
|
||||
</button>
|
||||
</Btn>
|
||||
{message && <span className="text-xs text-base-content/45">{message}</span>}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="border border-base-content/10 bg-base-100 overflow-hidden">
|
||||
<section className="lts-panel overflow-hidden">
|
||||
<div className="px-4 py-3 border-b border-base-content/10 flex items-center justify-between gap-3">
|
||||
<h2 className="text-sm font-bold">코드 목록</h2>
|
||||
<select
|
||||
value={stateFilter}
|
||||
onChange={(event) => setStateFilter(event.target.value as TournamentCodeState | '')}
|
||||
className="border border-base-content/10 bg-transparent px-2 py-1 text-xs"
|
||||
className="lts-select"
|
||||
>
|
||||
<option value="">전체</option>
|
||||
{STATES.map((state) => (
|
||||
@@ -271,7 +259,7 @@ export default function TournamentCodesPage() {
|
||||
</select>
|
||||
</div>
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full min-w-[900px] text-left">
|
||||
<table className="lts-table min-w-[900px]">
|
||||
<thead>
|
||||
<tr className="bg-base-200/40 border-b border-base-content/10 text-xs uppercase tracking-wider text-base-content/35">
|
||||
<th className="px-3 py-2">코드</th>
|
||||
@@ -322,7 +310,7 @@ export default function TournamentCodesPage() {
|
||||
{code.state === 'available' && (
|
||||
<button
|
||||
type="button"
|
||||
className="text-xs px-2 py-1 border border-red-500/20 text-red-400"
|
||||
className="text-xs px-2 py-1 border border-loss-line text-loss"
|
||||
onClick={() =>
|
||||
deleteMutation.mutate(code._id, {
|
||||
onSuccess: invalidate,
|
||||
@@ -350,6 +338,6 @@ export default function TournamentCodesPage() {
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</AdminPage>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,377 @@
|
||||
/* 경매 화면 전용 레이아웃. 색·모서리·글꼴은 index.css의 전역 토큰을 따른다. */
|
||||
#root:has(.auction-visual-preview) > div > nav .btn {
|
||||
border-radius: 10px !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
#root:has(.auction-visual-preview) .dev-auth-switcher {
|
||||
position: static;
|
||||
margin: 16px auto;
|
||||
}
|
||||
|
||||
.auction-visual-preview {
|
||||
--color-base-100: var(--color-background-card);
|
||||
--color-base-200: var(--color-background-surface);
|
||||
--color-base-300: var(--color-background-gray);
|
||||
--color-base-content: var(--color-text-primary);
|
||||
--color-primary: var(--color-accent);
|
||||
--color-primary-content: var(--color-on-accent);
|
||||
--lts-content-muted: var(--color-text-secondary);
|
||||
--lts-content-subtle: var(--color-text-secondary);
|
||||
--lts-content-disabled: var(--color-text-disabled);
|
||||
|
||||
color: var(--color-text-primary);
|
||||
font-family: Figtree, "Asta Sans", system-ui, sans-serif;
|
||||
font-size: var(--text-body-size);
|
||||
line-height: var(--text-body-leading);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-back-link {
|
||||
min-height: 32px;
|
||||
margin-bottom: var(--spacing-3);
|
||||
padding-inline: var(--spacing-2);
|
||||
margin-inline-start: calc(-1 * var(--spacing-2));
|
||||
border-radius: var(--radius-element);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-back-link:hover {
|
||||
background: var(--color-overlay-hover);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-masthead {
|
||||
align-items: end;
|
||||
gap: var(--spacing-3) var(--spacing-6);
|
||||
margin: 0;
|
||||
padding-block-end: var(--spacing-4);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-masthead-kicker {
|
||||
margin-bottom: var(--spacing-1);
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--text-supporting-size);
|
||||
line-height: var(--text-supporting-leading);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-masthead-title {
|
||||
color: var(--color-text-primary);
|
||||
font-size: clamp(1.5rem, 2.4vw, 1.875rem);
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.025em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-masthead-meta {
|
||||
margin-top: var(--spacing-2);
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--text-body-size);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-masthead-tools {
|
||||
align-items: center;
|
||||
flex-flow: row wrap;
|
||||
gap: var(--spacing-2) var(--spacing-3);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-masthead-controls {
|
||||
flex-wrap: wrap;
|
||||
gap: var(--spacing-2);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-connection,
|
||||
.auction-visual-preview .auction-original-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-2);
|
||||
min-height: 32px;
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--text-supporting-size);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-original-link {
|
||||
padding-inline: var(--spacing-3);
|
||||
border-radius: var(--radius-element);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-original-link:hover {
|
||||
background: var(--color-overlay-hover);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-preview-grid {
|
||||
display: grid;
|
||||
align-items: start;
|
||||
gap: var(--spacing-4);
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
margin-top: var(--spacing-3);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-preview-grid > * {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-preview-sidebar {
|
||||
display: grid;
|
||||
gap: var(--spacing-5);
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-region-title {
|
||||
margin-block-end: var(--spacing-3);
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--text-heading-3-size);
|
||||
font-weight: var(--text-heading-3-weight);
|
||||
line-height: var(--text-heading-3-leading);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-preview-stage > .auction-stage-title {
|
||||
margin-block-end: var(--spacing-3);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-teams-title {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: var(--spacing-2);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-teams-title > span {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--text-supporting-size);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-grid {
|
||||
gap: var(--spacing-3);
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.auction-visual-preview :is(.auction-team-card, .auction-spotlight, .auction-pool-card),
|
||||
.auction-visual-preview .auction-preview-chat > div {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-preview-stage > div:not(.fixed, .astryx-card),
|
||||
.auction-visual-preview .auction-preview-chat > div {
|
||||
border-color: var(--color-border);
|
||||
border-radius: var(--radius-container);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-card[data-current-bidder] {
|
||||
border-color: var(--color-text-accent);
|
||||
box-shadow: 0 0 0 3px var(--color-accent-muted);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-stripe {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-heading {
|
||||
padding: var(--spacing-3) var(--spacing-4);
|
||||
background: var(--color-background-surface);
|
||||
border-color: var(--color-border);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-summary {
|
||||
align-items: start;
|
||||
gap: var(--spacing-2);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-identity {
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
gap: 3px;
|
||||
min-width: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-name {
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--text-heading-4-size);
|
||||
font-weight: var(--text-heading-4-weight);
|
||||
letter-spacing: 0;
|
||||
line-height: var(--text-heading-4-leading);
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-budget {
|
||||
flex: none;
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--text-heading-2-size);
|
||||
font-weight: var(--text-heading-2-weight);
|
||||
line-height: var(--text-heading-2-leading);
|
||||
}
|
||||
|
||||
.auction-visual-preview :is(.auction-roster-head, .auction-roster-row) {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 3rem 3rem;
|
||||
gap: var(--spacing-2);
|
||||
align-items: center;
|
||||
padding-inline: var(--spacing-3);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-roster-head {
|
||||
min-height: 30px;
|
||||
background: var(--color-background-muted);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-roster-head > :last-child {
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-roster-row {
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
.auction-visual-preview :is(.auction-roster-head, .auction-roster-position, .auction-roster-cost, .auction-team-open-slots) {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--text-supporting-size);
|
||||
font-weight: var(--font-weight-normal);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-roster-cost {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-team-open-slots {
|
||||
padding: var(--spacing-2) var(--spacing-3);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-profile-identity {
|
||||
padding: var(--spacing-4);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-profile-avatar {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: var(--radius-element);
|
||||
}
|
||||
|
||||
.auction-visual-preview :is(.auction-roster-row, .auction-preview-pool) img {
|
||||
border-radius: var(--radius-inner);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-profile-meta {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-profile-name-line {
|
||||
align-items: baseline;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-profile-name {
|
||||
font-size: var(--text-heading-2-size);
|
||||
font-weight: var(--text-heading-2-weight);
|
||||
line-height: var(--text-heading-2-leading);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-current-bid {
|
||||
border-color: var(--color-border);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-current-bid-amount {
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--text-heading-1-size);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-passed-note {
|
||||
margin-inline: var(--spacing-4);
|
||||
padding: var(--spacing-2) var(--spacing-3);
|
||||
background: var(--color-warning-muted);
|
||||
border: 0;
|
||||
border-radius: var(--radius-element);
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-passed-note span {
|
||||
color: var(--color-on-warning-muted);
|
||||
font-size: var(--text-supporting-size);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-astryx-tabs {
|
||||
padding-inline: var(--spacing-2);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-tab-count {
|
||||
padding: 0 6px;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--color-background-gray);
|
||||
color: var(--color-text-secondary);
|
||||
font-size: var(--text-supporting-size);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-profile-history {
|
||||
height: auto;
|
||||
max-height: 16rem;
|
||||
min-height: 6rem;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-profile-metric {
|
||||
background: var(--color-background-muted);
|
||||
border-color: var(--color-border);
|
||||
border-radius: var(--radius-element);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-profile-metric > div:nth-child(2) {
|
||||
font-size: var(--text-heading-2-size);
|
||||
font-weight: var(--text-heading-2-weight);
|
||||
line-height: var(--text-heading-2-leading);
|
||||
}
|
||||
|
||||
.auction-visual-preview :is(.auction-pool-card, .auction-preview-chat > div) {
|
||||
height: 320px;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-preview-chat :is(form, .auction-chat-header) {
|
||||
border-color: var(--color-border);
|
||||
padding: var(--spacing-3);
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-chat-header > div:first-child,
|
||||
.auction-visual-preview .auction-operation-panel > div:first-child {
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--text-label-size);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.auction-visual-preview .auction-chat-header [data-connected="true"] {
|
||||
color: var(--color-text-success);
|
||||
}
|
||||
|
||||
.auction-visual-preview :is(select, textarea, input:not([type="checkbox"], [type="radio"])) {
|
||||
min-height: 32px;
|
||||
padding: var(--spacing-1) var(--spacing-2);
|
||||
background: var(--color-background-surface);
|
||||
border: 1px solid var(--color-border-emphasized);
|
||||
border-radius: var(--radius-element);
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--text-label-size);
|
||||
}
|
||||
|
||||
.auction-visual-preview .fixed.inset-0 > div {
|
||||
border-color: var(--color-border);
|
||||
border-radius: var(--radius-page);
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.auction-visual-preview .auction-team-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 920px) {
|
||||
.auction-visual-preview .auction-preview-grid {
|
||||
gap: var(--spacing-5);
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { LinkProvider } from "@astryxdesign/core/Link";
|
||||
import { Theme } from "@astryxdesign/core/theme";
|
||||
import { neutralTheme } from "@astryxdesign/theme-neutral/built";
|
||||
import { useTheme } from "../config";
|
||||
import { RouterLink } from "./RouterLink";
|
||||
|
||||
/**
|
||||
* Astryx 테마 경계. Neutral을 기반으로 하고 색·글꼴·모서리는 index.css의
|
||||
* lolympus 레이어가 덮는다. 라이트/다크는 앱의 기존 테마 저장값을 따른다.
|
||||
*/
|
||||
export function AppTheme({ children }: { children: ReactNode }) {
|
||||
const mode = useTheme();
|
||||
|
||||
return (
|
||||
<Theme theme={neutralTheme} mode={mode}>
|
||||
<LinkProvider component={RouterLink}>{children}</LinkProvider>
|
||||
</Theme>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
import {
|
||||
Children,
|
||||
isValidElement,
|
||||
type MouseEventHandler,
|
||||
type ReactNode,
|
||||
} from "react";
|
||||
import { Button } from "@astryxdesign/core/Button";
|
||||
|
||||
function textOf(node: ReactNode): string {
|
||||
return Children.toArray(node)
|
||||
.map((child) => {
|
||||
if (typeof child === "string" || typeof child === "number") {
|
||||
return String(child);
|
||||
}
|
||||
if (isValidElement<{ children?: ReactNode }>(child)) {
|
||||
return textOf(child.props.children);
|
||||
}
|
||||
return "";
|
||||
})
|
||||
.join("")
|
||||
.trim();
|
||||
}
|
||||
|
||||
export interface BtnProps {
|
||||
variant?: "primary" | "secondary" | "ghost" | "destructive";
|
||||
size?: "sm" | "md" | "lg";
|
||||
type?: "button" | "submit" | "reset";
|
||||
/** 앱 내부 경로 또는 외부 주소. 지정하면 링크로 렌더링한다. */
|
||||
to?: string;
|
||||
disabled?: boolean;
|
||||
loading?: boolean;
|
||||
/** 비활성 사유나 보조 설명. 툴팁으로 표시한다. */
|
||||
title?: string;
|
||||
/** 자식이 글자가 아닐 때의 접근성 이름. */
|
||||
label?: string;
|
||||
icon?: ReactNode;
|
||||
className?: string;
|
||||
onClick?: MouseEventHandler<HTMLButtonElement>;
|
||||
children?: ReactNode;
|
||||
"aria-pressed"?: boolean;
|
||||
"aria-expanded"?: boolean;
|
||||
"aria-controls"?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Astryx Button을 JSX 자식과 함께 쓰기 위한 얇은 어댑터.
|
||||
* 접근성 이름은 `label`, 없으면 자식의 글자에서 가져온다.
|
||||
*/
|
||||
export function Btn({
|
||||
variant = "secondary",
|
||||
size = "md",
|
||||
type = "button",
|
||||
to,
|
||||
disabled,
|
||||
loading,
|
||||
title,
|
||||
label,
|
||||
icon,
|
||||
className,
|
||||
onClick,
|
||||
children,
|
||||
...aria
|
||||
}: BtnProps) {
|
||||
const name = label ?? textOf(children);
|
||||
|
||||
return (
|
||||
<Button
|
||||
label={name}
|
||||
variant={variant}
|
||||
size={size}
|
||||
type={type}
|
||||
href={to}
|
||||
isDisabled={disabled}
|
||||
isLoading={loading}
|
||||
tooltip={title}
|
||||
icon={icon}
|
||||
className={className}
|
||||
onClick={onClick}
|
||||
{...aria}
|
||||
>
|
||||
{children}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { Spinner } from "@astryxdesign/core/Spinner";
|
||||
import { CircleAlert, Inbox } from "lucide-react";
|
||||
|
||||
/** 데이터가 없는 구획. `sm`은 카드 높이를 차지하지 않는 한 줄 안내다. */
|
||||
export function EmptyNote({
|
||||
title,
|
||||
description,
|
||||
action,
|
||||
icon,
|
||||
size = "md",
|
||||
className = "",
|
||||
}: {
|
||||
title: ReactNode;
|
||||
description?: ReactNode;
|
||||
action?: ReactNode;
|
||||
icon?: ReactNode;
|
||||
size?: "sm" | "md";
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
className={`flex flex-col items-center justify-center text-center ${
|
||||
size === "sm" ? "gap-1 px-4 py-6" : "gap-2 px-6 py-12"
|
||||
} ${className}`}
|
||||
>
|
||||
{size === "md" && (
|
||||
<span className="mb-1 grid size-10 place-items-center rounded-full bg-sunken text-content-subtle">
|
||||
{icon ?? <Inbox className="size-5" aria-hidden />}
|
||||
</span>
|
||||
)}
|
||||
<p className="text-sm font-semibold text-content-muted">{title}</p>
|
||||
{description && (
|
||||
<p className="max-w-sm text-xs leading-relaxed text-content-subtle">
|
||||
{description}
|
||||
</p>
|
||||
)}
|
||||
{action && <div className="mt-2">{action}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function ErrorNote({
|
||||
title = "불러오지 못했습니다",
|
||||
description,
|
||||
action,
|
||||
className = "",
|
||||
}: {
|
||||
title?: ReactNode;
|
||||
description?: ReactNode;
|
||||
action?: ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
role="alert"
|
||||
className={`flex items-start gap-3 rounded-box border border-loss-line bg-loss-tint px-4 py-3 ${className}`}
|
||||
>
|
||||
<CircleAlert className="mt-0.5 size-4 shrink-0 text-loss" aria-hidden />
|
||||
<div className="min-w-0 flex-1 text-sm">
|
||||
<p className="font-semibold text-loss">{title}</p>
|
||||
{description && (
|
||||
<p className="mt-0.5 break-words text-content-muted">{description}</p>
|
||||
)}
|
||||
</div>
|
||||
{action}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function LoadingNote({
|
||||
label = "불러오는 중",
|
||||
className = "",
|
||||
}: {
|
||||
label?: string;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
role="status"
|
||||
className={`flex items-center justify-center gap-2 py-16 text-sm text-content-subtle ${className}`}
|
||||
>
|
||||
<Spinner size="sm" shade="subtle" />
|
||||
<span>{label}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
import type { HTMLAttributes, ReactNode } from "react";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import { Link } from "react-router";
|
||||
import { pageWidthClass, type PageWidth } from "./layout";
|
||||
|
||||
export interface Crumb {
|
||||
label: string;
|
||||
to?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 페이지 머리 띠. 상단 내비게이션과 같은 잉크색으로 이어지고, 본문 시트가
|
||||
* 아래에서 겹쳐 올라온다. "지금 어디에 있고 무엇을 할 수 있는지"를 이 한
|
||||
* 곳에서 읽게 한다.
|
||||
*/
|
||||
export function PageHero({
|
||||
crumbs,
|
||||
eyebrow,
|
||||
title,
|
||||
badges,
|
||||
meta,
|
||||
description,
|
||||
actions,
|
||||
media,
|
||||
width = "lg",
|
||||
flush = false,
|
||||
children,
|
||||
}: {
|
||||
crumbs?: readonly Crumb[];
|
||||
eyebrow?: ReactNode;
|
||||
title: ReactNode;
|
||||
badges?: ReactNode;
|
||||
meta?: ReactNode;
|
||||
description?: ReactNode;
|
||||
actions?: ReactNode;
|
||||
media?: ReactNode;
|
||||
width?: PageWidth;
|
||||
/** 본문이 겹쳐 올라오지 않는 화면에서 아래 여백을 줄인다. */
|
||||
flush?: boolean;
|
||||
children?: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<header className="bg-ink text-on-ink">
|
||||
<div className={`${pageWidthClass(width)} pt-5 ${flush ? "pb-6" : "pb-14"}`}>
|
||||
{crumbs && crumbs.length > 0 && (
|
||||
<nav
|
||||
aria-label="현재 위치"
|
||||
className="mb-3 flex flex-wrap items-center gap-1 text-xs text-on-ink-muted"
|
||||
>
|
||||
{crumbs.map((crumb, index) => (
|
||||
<span key={index} className="inline-flex items-center gap-1">
|
||||
{index > 0 && (
|
||||
<ChevronRight className="size-3 opacity-60" aria-hidden />
|
||||
)}
|
||||
{crumb.to ? (
|
||||
<Link className="hover:text-on-ink" to={crumb.to}>
|
||||
{crumb.label}
|
||||
</Link>
|
||||
) : (
|
||||
<span aria-current="page">{crumb.label}</span>
|
||||
)}
|
||||
</span>
|
||||
))}
|
||||
</nav>
|
||||
)}
|
||||
<div className="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div className="flex min-w-0 items-center gap-4">
|
||||
{media}
|
||||
<div className="min-w-0">
|
||||
{eyebrow && (
|
||||
<p className="mb-1 text-xs font-semibold text-brand-coral">
|
||||
{eyebrow}
|
||||
</p>
|
||||
)}
|
||||
<div className="flex flex-wrap items-center gap-x-3 gap-y-1.5">
|
||||
<h1 className="min-w-0 break-words text-2xl font-extrabold leading-tight tracking-[-0.01em] sm:text-[28px]">
|
||||
{title}
|
||||
</h1>
|
||||
{badges}
|
||||
</div>
|
||||
{meta && (
|
||||
<div className="mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-on-ink-muted">
|
||||
{meta}
|
||||
</div>
|
||||
)}
|
||||
{description && (
|
||||
<p className="mt-2 max-w-2xl whitespace-pre-line text-sm leading-relaxed text-on-ink-muted">
|
||||
{description}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{actions && (
|
||||
<div className="flex shrink-0 flex-wrap items-center gap-2">
|
||||
{actions}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{children}
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
/** 머리 띠 위로 겹쳐 올라오는 본문 영역. */
|
||||
export function PageBody({
|
||||
width = "lg",
|
||||
className = "",
|
||||
children,
|
||||
}: {
|
||||
width?: PageWidth;
|
||||
className?: string;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<main
|
||||
className={`${pageWidthClass(width)} relative -mt-9 pb-16 ${className}`}
|
||||
>
|
||||
{children}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
/** 머리 띠 없이 쓰는 단순 페이지 본문. */
|
||||
export function PlainPage({
|
||||
width = "lg",
|
||||
className = "",
|
||||
children,
|
||||
}: {
|
||||
width?: PageWidth;
|
||||
className?: string;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<main className={`${pageWidthClass(width)} py-8 ${className}`}>
|
||||
{children}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export function Panel({
|
||||
as: Tag = "section",
|
||||
className = "",
|
||||
children,
|
||||
...rest
|
||||
}: {
|
||||
as?: "section" | "div" | "article" | "aside";
|
||||
className?: string;
|
||||
children: ReactNode;
|
||||
} & HTMLAttributes<HTMLElement>) {
|
||||
return (
|
||||
<Tag className={`lts-panel ${className}`} {...rest}>
|
||||
{children}
|
||||
</Tag>
|
||||
);
|
||||
}
|
||||
|
||||
export function PanelHeader({
|
||||
title,
|
||||
description,
|
||||
count,
|
||||
actions,
|
||||
className = "",
|
||||
}: {
|
||||
title: ReactNode;
|
||||
description?: ReactNode;
|
||||
count?: ReactNode;
|
||||
actions?: ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
className={`flex flex-wrap items-center justify-between gap-x-4 gap-y-2 border-b border-line px-4 py-3 sm:px-5 ${className}`}
|
||||
>
|
||||
<div className="min-w-0">
|
||||
<h2 className="flex items-baseline gap-2 text-[15px] font-bold text-content">
|
||||
{title}
|
||||
{count !== undefined && (
|
||||
<span className="tabular text-sm font-semibold text-content-subtle">
|
||||
{count}
|
||||
</span>
|
||||
)}
|
||||
</h2>
|
||||
{description && (
|
||||
<p className="mt-0.5 text-xs text-content-subtle">{description}</p>
|
||||
)}
|
||||
</div>
|
||||
{actions && (
|
||||
<div className="flex shrink-0 items-center gap-2">{actions}</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/** 메타 정보를 나열할 때 쓰는 구분점. */
|
||||
export function MetaDot() {
|
||||
return (
|
||||
<span
|
||||
aria-hidden
|
||||
className="size-[3px] shrink-0 rounded-full bg-current opacity-50"
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
||||
|
||||
const TONES = {
|
||||
neutral: "bg-sunken-strong text-content-muted",
|
||||
accent: "bg-primary-tint text-primary",
|
||||
live: "bg-leaf-tint text-leaf",
|
||||
win: "bg-win-tint text-win",
|
||||
loss: "bg-loss-tint text-loss",
|
||||
gold: "bg-gold-tint text-gold",
|
||||
ink: "bg-white/10 text-on-ink",
|
||||
solid: "bg-primary text-primary-content",
|
||||
} as const;
|
||||
|
||||
export type PillTone = keyof typeof TONES;
|
||||
|
||||
/** 읽기 전용 상태·분류 표식. 조작 가능한 칩은 Chip을 쓴다. */
|
||||
export function Pill({
|
||||
tone = "neutral",
|
||||
dot = false,
|
||||
pulse = false,
|
||||
className = "",
|
||||
children,
|
||||
}: {
|
||||
tone?: PillTone;
|
||||
dot?: boolean;
|
||||
pulse?: boolean;
|
||||
className?: string;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<span
|
||||
className={`inline-flex h-[22px] shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-2 text-xs font-semibold ${TONES[tone]} ${className}`}
|
||||
>
|
||||
{dot && (
|
||||
<span
|
||||
aria-hidden
|
||||
className={`size-1.5 rounded-full bg-current ${pulse ? "animate-pulse" : ""}`}
|
||||
/>
|
||||
)}
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
/** 배타 선택·필터에 쓰는 알약 버튼. 선택된 항목은 잉크색으로 채운다. */
|
||||
export function Chip({
|
||||
selected,
|
||||
className = "",
|
||||
children,
|
||||
...rest
|
||||
}: {
|
||||
selected: boolean;
|
||||
className?: string;
|
||||
children: ReactNode;
|
||||
} & ButtonHTMLAttributes<HTMLButtonElement>) {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
aria-pressed={selected}
|
||||
className={`inline-flex h-8 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-3 text-[13px] font-semibold transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${
|
||||
selected
|
||||
? "border-transparent bg-secondary text-secondary-content dark:bg-white dark:text-[#14161b]"
|
||||
: "border-line-strong bg-card text-content-muted hover:border-content-subtle hover:text-content"
|
||||
} ${className}`}
|
||||
{...rest}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { AnchorHTMLAttributes, Ref } from "react";
|
||||
import { Link } from "react-router";
|
||||
|
||||
const EXTERNAL_HREF = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
||||
|
||||
/**
|
||||
* Astryx의 Link·Button·Tab이 `href`를 받을 때 쓰는 앵커 구현.
|
||||
* 앱 내부 경로는 react-router로 이동하고 외부 주소는 일반 앵커로 둔다.
|
||||
*/
|
||||
export function RouterLink({
|
||||
href = "",
|
||||
ref,
|
||||
...props
|
||||
}: AnchorHTMLAttributes<HTMLAnchorElement> & {
|
||||
ref?: Ref<HTMLAnchorElement>;
|
||||
}) {
|
||||
if (EXTERNAL_HREF.test(href) || href.startsWith("#")) {
|
||||
return <a ref={ref} href={href} {...props} />;
|
||||
}
|
||||
return <Link ref={ref} to={href} {...props} />;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export { Button } from "@astryxdesign/core/Button";
|
||||
export { IconButton } from "@astryxdesign/core/IconButton";
|
||||
export { Spinner } from "@astryxdesign/core/Spinner";
|
||||
export { Skeleton } from "@astryxdesign/core/Skeleton";
|
||||
export { Tooltip } from "@astryxdesign/core/Tooltip";
|
||||
export { Dialog, DialogHeader } from "@astryxdesign/core/Dialog";
|
||||
export { TabList, Tab } from "@astryxdesign/core/TabList";
|
||||
export * from "./Page";
|
||||
export * from "./Feedback";
|
||||
export * from "./Pill";
|
||||
export { RouterLink } from "./RouterLink";
|
||||
export { pageWidthClass, type PageWidth } from "./layout";
|
||||
export { Btn } from "./Btn";
|
||||
@@ -0,0 +1,12 @@
|
||||
const WIDTHS = {
|
||||
md: "max-w-3xl",
|
||||
lg: "max-w-[1080px]",
|
||||
xl: "max-w-[1320px]",
|
||||
full: "max-w-[1600px]",
|
||||
} as const;
|
||||
|
||||
export type PageWidth = keyof typeof WIDTHS;
|
||||
|
||||
export function pageWidthClass(width: PageWidth = "lg") {
|
||||
return `${WIDTHS[width]} mx-auto w-full px-4 sm:px-6`;
|
||||
}
|
||||
@@ -8,10 +8,10 @@ const stylesheet = await readFile(
|
||||
);
|
||||
|
||||
const BRAND_COLORS = {
|
||||
coral: "oklch(0.708008 0.234375 24)",
|
||||
violet: "oklch(0.481934 0.285938 285)",
|
||||
gold: "oklch(0.853027 0.2 90)",
|
||||
cyan: "oklch(70% 0.14523 200)",
|
||||
coral: "oklch(70.8008% .234375 24)",
|
||||
ink: "#22252e",
|
||||
gold: "#f2b01e",
|
||||
leaf: "#2f9e58",
|
||||
} as const;
|
||||
|
||||
test("defines each brand color once as a primitive token", () => {
|
||||
@@ -28,48 +28,67 @@ test("defines each brand color once as a primitive token", () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("maps the light theme semantic roles to the brand primitives", () => {
|
||||
const lightTheme = cssBlocksForSelector('[data-theme="light"]');
|
||||
test("keeps the layer order that lets LOLYMPUS tokens override Astryx", () => {
|
||||
assert.match(
|
||||
stylesheet,
|
||||
/@layer reset, theme, base, astryx-base, astryx-theme, lolympus, components, utilities;/,
|
||||
);
|
||||
assert.doesNotMatch(stylesheet, /daisyui/);
|
||||
});
|
||||
|
||||
test("derives Astryx action colors from the brand coral", () => {
|
||||
assert.match(
|
||||
stylesheet,
|
||||
/--color-accent: var\(--color-brand-coral\);/,
|
||||
);
|
||||
assert.match(
|
||||
stylesheet,
|
||||
/--color-text-accent: light-dark\(\s*color-mix\(in oklab, var\(--color-brand-coral\) \d+%, black\),\s*color-mix\(in oklab, var\(--color-brand-coral\) \d+%, white\)\s*\);/,
|
||||
);
|
||||
});
|
||||
|
||||
test("separates fill and text colors for primary and result roles", () => {
|
||||
const mappings = [
|
||||
["--color-primary", "--color-brand-coral"],
|
||||
["--color-secondary", "--color-brand-violet"],
|
||||
["--color-accent", "--color-brand-gold"],
|
||||
["--color-info", "--color-brand-cyan"],
|
||||
["--color-primary", "--color-accent"],
|
||||
["--text-color-primary", "--color-text-accent"],
|
||||
["--color-win", "--lts-win-fill"],
|
||||
["--text-color-win", "--lts-win"],
|
||||
["--color-loss", "--lts-loss-fill"],
|
||||
["--text-color-loss", "--lts-loss"],
|
||||
["--color-bracket-winner", "--color-text-accent"],
|
||||
] as const;
|
||||
|
||||
for (const [semanticToken, primitiveToken] of mappings) {
|
||||
for (const [utilityToken, roleToken] of mappings) {
|
||||
assert.match(
|
||||
lightTheme,
|
||||
stylesheet,
|
||||
new RegExp(
|
||||
`${escapeRegExp(semanticToken)}: var\\(${escapeRegExp(primitiveToken)}\\);`,
|
||||
`${escapeRegExp(utilityToken)}: var\\(${escapeRegExp(roleToken)}\\);`,
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test("keeps coral scopes without overriding the global dark primary", () => {
|
||||
assert.match(
|
||||
stylesheet,
|
||||
/--color-bracket-winner: var\(--color-brand-coral\);/,
|
||||
);
|
||||
assert.match(
|
||||
stylesheet,
|
||||
/\.competition-series-history\s*{\s*--color-primary: var\(--color-brand-coral\);\s*}/,
|
||||
);
|
||||
test("defines every role color for both light and dark", () => {
|
||||
const roleTokens = [
|
||||
"--lts-ink",
|
||||
"--lts-win",
|
||||
"--lts-win-tint",
|
||||
"--lts-loss",
|
||||
"--lts-loss-tint",
|
||||
"--lts-gold",
|
||||
"--lts-leaf",
|
||||
"--lts-sunken",
|
||||
];
|
||||
|
||||
const darkTheme = cssBlocksForSelector('[data-theme="dark"]');
|
||||
assert.doesNotMatch(darkTheme, /--color-primary/);
|
||||
for (const token of roleTokens) {
|
||||
assert.match(
|
||||
stylesheet,
|
||||
new RegExp(`${escapeRegExp(token)}: light-dark\\(`),
|
||||
`${token} should use light-dark()`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
function cssBlocksForSelector(selector: string): string {
|
||||
const blocks = stylesheet.matchAll(
|
||||
new RegExp(`${escapeRegExp(selector)}\\s*{([^}]*)}`, "g"),
|
||||
);
|
||||
const contents = [...blocks].map((match) => match[1] ?? "").join("\n");
|
||||
assert.notEqual(contents, "", `${selector} should have a CSS block`);
|
||||
return contents;
|
||||
}
|
||||
|
||||
function escapeRegExp(value: string): string {
|
||||
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
# Astryx 경매 시안 검증
|
||||
|
||||
스테이징 `test300` 경매의 4팀·관전자·유찰 표본을 사용했다. 로컬 Astryx 소스 `86a32152f4`에서 Neutral 테마와 `Card`, `TabList`, `Badge`, `Button`, `StatusDot` 구현을 읽었다. 공식 카탈로그와 동일한 배포 버전 `0.7.11`을 설치했다. [Card 원본](https://astryx.atmeta.com/components/Card) · [Tab List 원본](https://astryx.atmeta.com/components/TabList)
|
||||
|
||||
| 상태 | 뷰포트 | 렌더링 증거 |
|
||||
| --- | --- | --- |
|
||||
| 공식 Card·Tab List 다크 | 1280 CSS px, 각 1265 × 712 이미지 px | [Card](docs/ux-audit-2026-11-10/evidence/AX-reference-card-dark.jpg) · [Tab List](docs/ux-audit-2026-11-10/evidence/AX-reference-tabs-dark.jpg) |
|
||||
| 경매 라이트·다크 | 1280 × 900 CSS px, 각 1265 × 889 이미지 px | [라이트](docs/ux-audit-2026-11-10/evidence/AX-preview-1280-light.jpg) · [다크](docs/ux-audit-2026-11-10/evidence/AX-preview-1280-dark.jpg) |
|
||||
| 경매 모바일 라이트 | 390 × 860 CSS px, 375 × 827 이미지 px | [모바일](docs/ux-audit-2026-11-10/evidence/AX-preview-390-light.jpg) |
|
||||
|
||||
두 소스는 DPR 1로 캡처했다. 실제 콘텐츠가 다르므로 카드 경계, 선택 표시와 표면을 비교했다. 전체 이미지는 비율을 유지해 축소했고 왼쪽의 공식 예제는 원본 크기로 잘랐다. [전체 시안과 공식 예제 확대 비교](docs/ux-audit-2026-11-10/evidence/AX-reference-comparison.jpg)
|
||||
|
||||
**Findings**
|
||||
|
||||
- [P2 · 해결] 첫 렌더에서 경매 운영 영역이 팀 카드보다 길어 오른쪽에 큰 빈 공간이 생겼다. 선수 명단과 채팅을 팀 현황 바로 아래에 배치해 오른쪽 영역이 이어지게 했다. 최종 라이트·다크 캡처에서 팀 카드 다음에 선수 명단이 보인다.
|
||||
- [P2 · 해결] 최초 스테이징 빌드에 Astryx 공용 CSS와 JS가 포함됐다. 개발용 쿼리가 켜질 때 시안 CSS를 불러오고, Astryx 렌더 분기는 빌드에서 제거되도록 했다. 442kB였던 빌드의 CSS가 149kB로 내려왔고, 개발용 주소를 새로고침해 실제 Astryx 카드가 12px 곡률로 렌더링됨을 다시 확인했다.
|
||||
|
||||
**시각·동작 검증**
|
||||
|
||||
- Neutral의 바탕·카드·테두리·액션을 라이트와 다크에서 확인했다. 실제 Astryx 탭의 밑줄과 버튼의 채움이 공식 예제와 같은 역할을 한다. 제목은 경매 맥락에 맞춰 확대했고, Figtree와 한글 폴백을 지정했다.
|
||||
- 카드 상단을 맞추고 로스터의 포지션·낙찰가 열을 추가했다. 실제 Riot 프로필 이미지와 랭크·포지션 아이콘을 유지했다. 표시된 이름과 가격, 빈 로스터와 대기 명단을 실제 데이터로 확인했다.
|
||||
- 390, 768, 1280 CSS px에서 가로 넘침을 확인했다. 선수 전적은 방향키와 Enter, 명단은 대기·유찰 탭으로 바꿨다. 기존 화면 보기의 라우팅, 다크 전환, 시안 새로고침 후 콘솔을 확인했다.
|
||||
|
||||
**Open Questions**
|
||||
|
||||
- 표본은 유찰 단계였다. 입찰·낙찰·채팅 전송 같은 쓰기 동작의 재현은 이번 시각 검증 범위 밖이다.
|
||||
|
||||
**Implementation Checklist**
|
||||
|
||||
- [x] 공식 Neutral과 실제 Astryx 컴포넌트로 로컬 경매 시안을 렌더링했다.
|
||||
- [x] 데스크톱 라이트·다크와 모바일을 캡처하고 Astryx 공식 예제와 비교했다.
|
||||
- [x] 웹 테스트 144개, 변경 파일 ESLint, TypeScript 및 스테이징 빌드를 통과했다.
|
||||
|
||||
final result: passed
|
||||
@@ -0,0 +1,121 @@
|
||||
# 내전 상태와 대회·시리즈·세트 표시 명세
|
||||
|
||||
2026년 11월 10일 · UX/UI 결과 표시 · 후속 구현 제안
|
||||
|
||||
결과 표시 작업은 **대회·시리즈·세트의 결과 범위를 분리**하는 데 집중한다. 전적 화면의 `2:0`은 해당 두 팀의 시리즈에서만 표시한다. 전체 개편은 토큰과 프리미티브를 먼저 적용한다. 경매 상태와 코드 발급 대기는 감사 당시 스테이징에서 관찰한 두 사례로, 현재 운영 흐름의 수정 범위를 정하기 전에 정상 데이터로 확인한다. [UI 우선 검토](../ux-audit-2026-11-10/06-ui-improvement-review.md) · [감사 보고서](../ux-audit-2026-11-10/README.md)
|
||||
|
||||
## 1. 현재 원인과 범위
|
||||
|
||||
1. **구현 대상.** 공식 대회 데이터에는 `seriesId`, `gameSlotId`, `winnerTeamId`가 있다. 통계용 변환에서는 해당 식별 관계가 결과 DTO로 이어지지 않는다. 전적 서비스는 팀 인덱스 쌍으로 결과를 다시 묶고, 대회 카드와 상세는 `seriesResults[0]`, 세트 상세는 팀 인덱스 조합으로 점수를 선택한다. 정상 데이터에서도 서로 다른 두 시리즈가 같은 팀 쌍을 가지면 이 방식으로는 둘을 구별할 수 없다. [공식 계약](../../packages/contracts/src/game.ts#L44) · [통계용 변환](../../apps/api/src/modules/community-stats/match-stats.service.ts#L394) · [재집계](../../apps/api/src/modules/community-stats/community-stats.service.ts#L645) · [세트의 팀 쌍 선택](../../apps/web/src/pages/MatchGameDetailPage.tsx#L234)
|
||||
2. **재현 대기.** 경매 시작 경로는 편성이 끝나기 전에 `Match.status = 'team-built'`를 저장할 수 있다. 홈과 상세의 라벨이 다른 것은 코드로 확인했다. 감사 당시 `test300`의 저장 상태와 경매 스냅샷이 같은 정상 전이를 나타내는지, 중단·복구·정정이 있었는지는 확인하지 못했다. 이 기록을 정상 경매의 회귀 기준으로 쓰지 않는다. [경매 시작](../../apps/api/src/modules/auction/auction.service.ts#L478) · [홈 상태 라벨](../../apps/web/src/pages/HomePage.tsx#L348) · [상세 상태 라벨](../../apps/web/src/pages/MatchDetailPage.tsx#L298)
|
||||
3. **정상일 수 있는 대기 상태.** 대진의 `ready`와 슬롯의 코드 할당은 별도 상태다. 팀 화면에 `발급 대기`가 보였다는 사실만으로 코드 발급 실패나 화면 결함을 판단할 수 없다. 스테이징 당시 할당 예정 시점, 코드 풀, 후속 처리 결과는 확인하지 못했다. [팀 진행 조회](../../apps/api/src/modules/competition/competition-query.service.ts#L107) · [코드 할당 처리](../../apps/api/src/modules/tournament-result/competition-outbox.processor.ts#L208)
|
||||
|
||||
기존 `Match`·경매·`Competition`이 각각 소유하는 상태 전이와 점수 산정은 유지한다. 새 작업은 읽기 계약, 공통 표시 규칙, 상태에 맞는 기존 행동 링크, 조회 상태를 다룬다. 저장 enum, 입찰·팀빌딩·판정 명령, 대진 알고리즘, 신규 모집 정책, 알림 및 전체 디자인 토큰 교체는 별도 변경이다. [기존 Competition 도메인 명세](competition-result-domain.md)
|
||||
|
||||
## 2. 어떤 데이터가 무엇을 결정하는가
|
||||
|
||||
| 질문 | 기준 데이터 | 화면에 주는 값 |
|
||||
| --- | --- | --- |
|
||||
| 모집·팀빌딩·내전 진행 중 어디인가? | `Match.status`와 확정 팀 근거, 해당 내전의 현재 경매 | 공통 내전 단계 및 홈 섹션. 예정 시각은 일정과 정렬에 사용한다. |
|
||||
| 현재 입찰 라운드는 무엇인가? | 현재 경매 lifecycle의 스냅샷·소켓 업데이트 | 입찰 대기/진행/마감 확인/낙찰/유찰. 전송 중·재연결 중은 별도 표시한다. |
|
||||
| 대회와 시리즈의 공식 결과는 무엇인가? | 같은 `Competition` revision의 `projection`·`outcome` | 형식·공식 대회 상태·순위/우승·시리즈 점수·판정. |
|
||||
| 세트는 실제로 끝났는가? 분석을 볼 수 있는가? | 해당 `gameSlotId`와 연결된 공식 `Game`, 현재 revision에 해당하는 통계 상세 | 공식 세트 승패와 분석 가용성을 분리한다. |
|
||||
| 코드가 지금 사용 가능한가? | 기존 팀 진행 API의 해당 슬롯 할당과 만료 | 코드 상태 및 복사 가능 여부. 공개 내전 요약에는 코드를 담지 않는다. |
|
||||
|
||||
표시 상태는 동작 권한이 아니다. 역할·커뮤니티·팀 권한과 제출 가능 여부는 기존 조회·명령의 검증을 사용한다. 버튼 활성화에는 UI 표시 상태에 더해 기존의 권한, 데이터 최신성, 진행 중 요청 조건을 적용한다. 공식 상태와 `Match` 상태가 잠시 다른 동안에는 각각 `공식 결과`와 `내전 상태`의 범위에서 보여 준다. 예를 들어 판정 반영 직후 경기 기록에는 `공식 결과 확정`이 보일 수 있고, 홈은 outbox가 `Match.status`를 갱신한 뒤 종료 기록으로 이동한다. 결과 정정에서도 같은 원칙을 적용한다. [기존 outbox](../../apps/api/src/modules/tournament-result/competition-outbox.processor.ts#L192)
|
||||
|
||||
## 3. 공통 내전 상태 검증과 조건부 설계
|
||||
|
||||
정상 절차로 만든 격리 내전에서 경매 시작 → 입찰 또는 유찰 → 편성 반영을 따라간다. 같은 `matchId`와 경매 lifecycle에서 현재 phase·revision·편성 반영 상태를 기록한 뒤 홈과 상세의 재조회 결과를 대조한다. 코드 흐름은 대진 확정 시각, 슬롯 할당 전후, 후속 처리 결과를 확인한다. `ready` 상태에서 코드 할당 전 대기는 정상 시나리오로 다룬다. 관찰 결과는 다음과 같이 처리한다.
|
||||
|
||||
| 검증 결과 | 구현 범위 |
|
||||
| --- | --- |
|
||||
| 이전 스냅샷이나 오류가 있는 레코드에서만 재현 | 해당 데이터·복구 경로의 문제로 분리한다. 정상 화면용 새 상태 계약은 보류한다. |
|
||||
| 정상 경매에서 편성 전인데 상세가 완료를 표시 | 상세가 이미 조회하는 경매 데이터로 해당 라벨을 바로잡을 수 있는지 먼저 확인한다. 정상 데이터에서 홈까지 의미가 어긋나고 기존 정보로 해결할 수 없는 경우에만 아래 공통 상태 API를 검토한다. |
|
||||
| 대진 확정 뒤 예정대로 코드가 발급됨 | 현재 상태와 흐름을 유지한다. 반복적인 문의나 입장 혼동이 확인될 때만 문구를 개선한다. |
|
||||
| 발급 조건이 충족됐지만 할당이 누락되거나 멈춤 | 슬롯·코드 풀·후속 처리의 원인을 따로 조사한다. 문구 변경만으로 해결된 것으로 보지 않는다. |
|
||||
|
||||
다음 API와 화면 규칙은 홈·상세 공통 상태가 필요하다는 결과가 나올 때 사용할 설계안이다. 홈의 날짜 분류 개선은 실제 진행 내전이 과거 목록에 묻히는 정상 사례를 확인한 뒤 범위를 결정한다.
|
||||
|
||||
목록과 상세를 제공하는 API에 `eventProgress?: { stage: EventStage }`를 추가한다. `status`는 기존 도메인 값 그대로 반환한다. 서버가 한 함수에서 `stage`를 계산하고, 웹은 한 매핑에서 문구·강조도·화면별 진입점을 선택한다. 화면별로 `team-built`를 직접 번역하는 코드를 교체한다.
|
||||
|
||||
아래 표는 위에서부터 우선 적용한다. ‘편성 확정 근거’는 정상 링크된 `competitionId`, 또는 유효한 `teamBuiltAt`과 2개 이상 저장된 팀이다. 현재 경매가 살아 있거나 반영 실패 상태임을 알고 있다면 확정 근거를 먼저 적용하지 않는다. 데이터 불일치는 `team-check`로 표현하고 기존 명령 검증을 유지한다.
|
||||
|
||||
| `EventStage` | 결정 조건 | 화면 기본 문구 | 주요 진입점 |
|
||||
| --- | --- | --- | --- |
|
||||
| `finished` | `Match.status = finished` | 종료 | 경기 일정·결과. 공식 결과가 정정 중이면 공식 상태를 별도 안내. |
|
||||
| `in-progress` | `Match.status = in-progress` | 진행 중 | 대진표·일정. 기존 권한으로 내 팀을 확인할 수 있으면 팀 진행. |
|
||||
| `recruiting` | `recruiting`이고 해당 내전의 현재 경매가 없음을 확인함 | 모집 중 | 내전 상세의 참가 영역. 정원·로그인·기참가 조건은 기존 참가 판단을 사용. |
|
||||
| `auction-preparing` | 현재 경매 `startupCompleted = false` 또는 `waiting` | 경매 준비 중 | 경매 페이지. 시작 처리 중에는 신청·입찰 가능 여부를 추정하지 않음. |
|
||||
| `auction-active` | 현재 경매 `presenting`, `bidding`, `sold`, `passed` | 팀빌딩 중 | 경매 보기. 라운드 문구는 경매 페이지에 추가 표시. |
|
||||
| `team-finalizing` | 현재 경매 `complete`이고 편성 반영이 `pending/processing`, 또는 실패 신호와 확정 근거가 모두 없음 | 팀 편성 반영 중 | 경매 결과 보기. 공식 대진 및 코드 CTA는 실제 준비 상태에 따름. |
|
||||
| `team-check` | 편성 반영 `failed`, 알려진 데이터 불일치, 또는 필요한 조회를 확인하지 못함 | 팀빌딩 상태 확인 필요 | 내전 상세 또는 경매 보기. 운영자에게만 오류·회복 경로를 제공. |
|
||||
| `teams-finalized` | 활성 경매가 없거나 종료됐고 편성 확정 근거가 있음 | 팀 편성 완료 | 대진표가 조회되면 보기. 초기화 대기면 `대진 준비 중` 표시. |
|
||||
|
||||
`team-built`인데 경매·확정 근거가 없거나 구버전 API에 `eventProgress`가 없으면 `팀빌딩 상태 확인 필요`로 표시한다. 조회 실패는 경매 없음과 다르다. `recruiting`과 이미 시작된 경매가 함께 보이면 시작이 확인된 현재 lifecycle만 표시한다. 완료된 취소의 lifecycle은 조회 후보에서 제외한다. 경매 취소가 성공해 Match가 모집 상태로 돌아가면 `모집 중`을 표시하고 이전 경매 상태를 폐기한다. 새 경매 lifecycle과 이전 revision을 같은 타임라인에서 비교하지 않는다. [기존 경매 스냅샷 병합](../../apps/web/src/api/auction-state.ts#L22) · [경매 시작 복구](../../apps/api/src/modules/auction/auction.service.ts#L578)
|
||||
|
||||
### 읽기 경로와 홈 목록
|
||||
|
||||
- 목록에 표시될 ID만 대상으로 경매의 소형 상태를 배치 조회한다. Mongo에서는 현재 경매와 `startupCompleted`, 엔진, lifecycle, revision 및 반영 상태만 읽는다. Redis 경매는 같은 lifecycle이고 오래되지 않은 스냅샷의 phase/반영 상태를 사용할 수 있다. Redis 누락·불일치·오류의 경우 확정 근거가 있는 종료 경매만 보존하고, 확인이 필요한 활성 후보는 `team-check`로 내려준다. 목록 요청은 기존 전체 경매 조회나 재수화 경로를 호출하지 않는다. 사용자 ID, 현재 선수, 채팅, 입찰 금액, 코드가 공통 상태 응답에 들어가지 않는다.
|
||||
- 기존 매치 목록 API에 홈 전용 `view=active|upcoming|history`를 추가한다. `active`는 `team-built/in-progress` 및 `scheduledAt < asOf`인 `recruiting`, `upcoming`은 `scheduledAt >= asOf`인 `recruiting`, `history`는 `finished`다. 홈은 한 번의 갱신에 세 조회가 공유할 ISO `asOf`를 보내고, 서버는 날짜 형식을 검증한 뒤 필터·정렬·페이지를 적용한다. 기존 `status` 및 날짜 필터를 사용하는 호출자는 그대로 동작한다. `view`와 기존 상태·날짜 필터를 한 요청에 섞으면 400으로 응답한다. 날짜는 모집 내전의 목록 위치만 정하며, 예정 시각이 지났다는 이유로 참가 가능 상태를 종료로 바꾸지 않는다.
|
||||
- 홈은 `진행 중인 내전`과 `예정된 내전`, `지난 내전 기록`을 따로 보여 준다. 진행·종료는 `scheduledAt` 최신순, 예정은 가까운 순이며 동일한 시각의 순서는 `_id`로 고정한다. 서버 페이지를 통째로 클라이언트에서 재정렬하지 않는다. 진행 중인 6월 내전은 날짜가 오래돼도 종료 목록에 들어가지 않는다. 각 섹션 오류는 그 섹션에서 복구할 수 있다.
|
||||
- 경매 소켓으로 같은 lifecycle의 단계가 바뀌거나 시작·종료·취소 명령이 확정되면 해당 Match detail 및 목록 query를 갱신한다. `presenting/bidding/sold/passed` 사이의 가격·타이머 틱마다 홈을 다시 요청할 필요는 없다. 오래 열린 홈은 전면 복귀 시 갱신한다. 외부 운영자의 상태 전이는 기존 소켓 또는 제한된 재조회로 반영하며, 기존 목록의 전체 실시간 구독을 추가하지 않는다.
|
||||
|
||||
경매 페이지에서는 `팀빌딩 중` 아래 `입찰 대기`, `입찰 진행 중`, `낙찰`, `유찰 · 다음 선수 대기`를 해당 phase로 표시한다. 화면 타이머가 0초가 되면 기존 마감 가드에 맞춰 `마감 · 서버 결과 확인 중`을 보여 준다. 서버가 확정할 때까지 낙찰이나 유찰을 추정하지 않는다. `연결 중`, `재연결 중`, `입찰 확인 중`은 각각 연결 및 요청 상태로 표시한다.
|
||||
|
||||
## 4. 대회·시리즈·세트 표시 규칙
|
||||
|
||||
| 단위 | 표시 기준 | 예시 |
|
||||
| --- | --- | --- |
|
||||
| 대회 / 내전 | 제목·형식·공식 진행 상태. 더블 엘리미네이션은 공식 완료 후에만 우승팀, 라운드 로빈은 공식 순위 및 공동 1위. `paired-series` 대회에 종합 우승을 만들지 않는다. | `멸망전 · 8팀 더블 엘리미네이션` / `공식 시리즈 6개 확정` / `결승 확정 후 우승팀 ○○` |
|
||||
| 단일 시리즈 요약 | 대회 그래프가 **실제로 시리즈 1개**인 `paired-series`에서만 시리즈 요약을 대회 헤더 아래에 둘 수 있다. 시즌 필터 결과가 한 팀 쌍 또는 시리즈 하나라는 사실은 판단에 사용하지 않는다. | `시리즈 결과 · 나물장수 2:0 원딜미아요` |
|
||||
| 시리즈 | 라운드·시리즈 이름, 두 팀, 형식, 상태. 점수는 `entries`의 A/B 슬롯을 실제 팀 ID에 붙인다. 해당 세트의 블루/레드 진영이 바뀌어도 표의 팀 순서와 시리즈 점수는 유지한다. | `승자조 1라운드 · 1경기 · 3전 2선승` / `나물장수 2:0 원딜미아요` |
|
||||
| 세트 | 시리즈 안 번호인 `ordinal`을 화면에 사용한다. 세트 승패는 해당 공식 Game의 승자·진영으로 표시한다. `displayNumber`는 기존 링크 해석과 필요한 보조 표기에 사용한다. | `승자조 1라운드 · 1경기 · 1세트` / `나물장수 승리 · 블루 · 28:24` |
|
||||
| 레거시 기록 | 공식 연결을 확정할 수 없으면 개별 기록에서 확인 가능한 팀·승패·전역 경기 번호를 표시한다. 상대 조합을 시리즈 ID 또는 우승의 근거로 삼지 않는다. | `과거 기록 · 7경기` / `공식 시리즈 정보 없음` |
|
||||
|
||||
세트의 기본 헤더에는 `2:0`도, 세트 승패를 숫자로 바꾼 `1:0`도 넣지 않는다. 필요하면 별도 `시리즈 최종 2:0` 또는 `시리즈 현재 1:0`을 함께 표시한다. `현재/최종`은 공식 시리즈 상태가 결정한다. 동일 두 팀이 승자조와 결승에서 다시 만나면 별개의 `seriesId`와 세트 목록을 가진다.
|
||||
|
||||
표의 라운드 이름은 설명용 예시다. 화면에서는 기존 공식 대진의 라운드 이름을 공용 함수로 재사용하고 내전 상세, 전적, 팀 진행 사이에서 같은 이름을 쓴다. [기존 팀 진행 명세](team-progress-page-ux-refresh.md)
|
||||
|
||||
| 시리즈/슬롯 상태 | 화면 문구와 점수 |
|
||||
| --- | --- |
|
||||
| `inactive` | 일반 목록에서 숨긴다. 브래킷에서 조건을 보여 줄 때에는 `리셋 결승 · 조건부` 등으로 표시한다. |
|
||||
| `waiting` | `대진 미정` 및 확인된 팀/진출 조건. 점수 없음. |
|
||||
| `ready` | `대진 확정`, 일정이 없으면 `일정 미정`. 코드 할당이 있는 화면은 `코드 발급 대기/사용 가능/만료`를 별도로 표시한다. 점수 없음. |
|
||||
| `in-progress` | `진행 중`. 공식 인정된 게임이 있는 경우에만 `현재 1:0`처럼 점수를 붙인다. |
|
||||
| `completed / played` | `최종 2:0`, 공식 승자 표시. |
|
||||
| `completed / draw` | `무승부`. 실제 경기로 성립한 경우에만 최종 점수 표시. 운영 판정 무승부에는 점수를 만들지 않는다. |
|
||||
| `completed / walkover, forfeit, administrative` | `부전승 / 기권승 / 판정승`과 공식 승자. 점수 대신 결정 문구. 판정 전에 인정된 세트가 있으면 해당 기록은 펼쳐 볼 수 있다. |
|
||||
| `voided` 또는 시리즈 종료 후 사용되지 않은 슬롯 | `무효` 또는 `미진행`을 구별한다. 점수 및 다른 세트로 이어지는 분석 링크 없음. |
|
||||
| 공식 Game 있음 / 통계 상세 없음 | 세트 승패는 그대로 표시하고 `상세 분석 준비 중`을 붙인다. API 요청 실패는 `상세 분석을 불러오지 못했습니다 · 다시 시도`로 구분한다. |
|
||||
|
||||
팀 진행에서 실제 혼동이 확인되면 `대진 확정 · 코드 발급 대기`처럼 대진과 코드 상태를 함께 안내하는 문구를 검토한다. `used` 코드는 사용 완료를 뜻하며 Riot 기록 수집 여부는 별도 데이터다. [팀 진행의 현재 코드 상태](../../apps/web/src/pages/match-team-progress-view.ts#L128)
|
||||
|
||||
## 5. 데이터 계약과 호환성
|
||||
|
||||
- `packages/contracts`에 기존 ID 타입을 재사용해 공개 내전 상태와 공식 전적 표시 계약을 정의한다. 기존 필드에 `eventProgress` 및 선택적 `resultPresentation`을 추가하는 방식으로 이행한다. `resultPresentation`은 `official`, `legacy`, `unavailable`을 구별한다. 과거 API에 새 필드가 없는 경우 웹은 레거시라고 단정하지 않고 기록 단위에서 확인할 수 있는 결과만 보여 준다.
|
||||
- 목록의 공식 요약에는 `competitionId`, `sourceRevision`, `formatType`, `phase`, `teamCount`, 공식 확정 시리즈 수와 해당 형식의 공식 결과 요약을 담는다. 단일 시리즈 예외가 성립하는 경우에만 해당 요약을 포함한다. 공식 카드는 현재 페이지의 대회 ID를 한 번에 조회해 필요한 필드만 결합한다. 필터 날짜의 게임만 다시 센 수치는 `조회 기간 내 기록 N세트`처럼 별도로 표시한다. 필터 결과로 공식 시리즈 최종 점수나 우승이 바뀌지 않는다.
|
||||
- 대회 상세에는 공식 요약과 표시할 `series`, `gameSlots`, 인정 `games`의 최소 필드를 같은 revision에서 제공한다. 팀 이름과 점수는 `teamId`, 세트 분석은 정확한 `gameId`/`gameSlotId`를 사용한다. 통계 상세의 기존 `gameNumber`는 유지하되 응답에 공식 `gameId`, `gameSlotId`, `seriesId`, `ordinal`을 연결한다. 기존 통계 fragment를 연결할 때는 같은 대회·revision과 Riot 증빙 ID가 유일하게 맞는 경우만 사용한다. 레거시 증빙은 명시적인 참조가 일치할 때만 연결한다. 이름·팀 쌍·배열 위치로 연결하지 않는다.
|
||||
- 첫 배포에는 기존 통계 집계 계산을 교체할 필요가 없다. 공식 경기 표시에서 재집계된 `seriesResults`와 `winnerTeamIndex`의 소비를 끊고, 기존 통계 필드는 호환용으로 보존한다. 결과 정정으로 공식 revision이 앞서면 최신 공식 결과를 표시하고 이전 통계 상세를 새 세트 결과처럼 붙이지 않는다. 결과 응답 캐시 버전을 올리고 기존 outbox 무효화와 fragment 재구축을 재사용한다. DB 일괄 마이그레이션 없이 캐시 갱신으로 이행한다. [현행 상세 캐시](../../apps/api/src/modules/community-stats/community-stats.service.ts#L219) · [현행 fragment 최신성 확인](../../apps/api/src/modules/community-stats/community-stats.service.ts#L589)
|
||||
- 기존 두 세트 URL은 유지한다. 공개 대진 `/match/:id/game/:gameNumber`의 기본 복귀는 `/match/:id?tab=games`, 커뮤니티 경로의 기본 복귀는 해당 전적 상세다. 같은 시리즈를 펼치려면 `seriesId`를 포함한 링크를 생성하고 해당 대회 소속인지 검증한다. 전역 번호로 정확히 일치하는 세트만 열며, 없으면 `아직 기록이 없는 세트` 또는 `해당 세트를 찾을 수 없습니다`로 안내한다. 기존 분석이 없는 공식 세트는 공식 대진 정보를 사용해 별도로 판단한다. [정확 번호 선택](../../apps/web/src/lib/internal-match-game-selection.ts)
|
||||
- 커뮤니티 통계의 순위·하이라이트·최근 내전은 각각 `loading / success / error`를 독립 처리한다. `sideWinRate.confirmed?: { sampleSize, blue, red }`를 추가해 승패가 확인된 세트의 수와 그 표본의 승률을 반환한다. 새 분모가 0이면 `— · 표본 없음`, 분모 12에서 블루 승리가 0번이면 `0% · 12세트`다. 기존 승률과 `bluePicks/redPicks`의 계산은 호환용으로 보존한다. 새 분모가 없는 구버전 응답에서는 확인된 표본 수라고 단정하지 않는다. 재조회에 실패했지만 기존 성공 데이터가 있으면 그 값과 갱신 실패를 함께 표시한다. [현행 인사이트 응답](../../apps/api/src/modules/community-stats/community-stats.service.ts#L180)
|
||||
|
||||
## 6. 구현 순서와 완료 조건
|
||||
|
||||
| 작업 | 코드 접점 | 완료 조건 |
|
||||
| --- | --- | --- |
|
||||
| 1. 공식 결과 연결 | `CommunityStatsService`, 공식 Competition 조회, 통계 상세 DTO, 캐시 | 한 대회 안의 동일 팀 재대결이 각각 다른 `seriesId` 및 점수를 보유. 시즌 필터와 결과 정정에서도 공식 점수가 정체성을 유지. 페이지 크기에 비례하는 외부 요청 증가 없음. |
|
||||
| 2. 전적 화면 적용 | `CommunityInternalStatsPage`, `InternalMatchDetailPage`, `MatchGameDetailPage`, 기존 `CompetitionSeriesHistory` | 대회 헤더에서 임의 점수 제거. 시리즈 점수와 세트 승패 구별, 링크 보존과 진입 맥락별 복귀. 표본 없음과 조회 실패는 별도 상태로 표시. |
|
||||
| 병행 검증. 경매·코드 상태 | `HomePage`, `MatchDetailPage`, `AuctionPage`, 팀 진행 표시 유틸 및 각 조회 계약 | 새 내전에서 편성 전후와 슬롯 할당 전후를 확인한다. 정상 절차에서 문제가 재현되는 화면만 수정 범위에 넣는다. |
|
||||
|
||||
전적 화면은 공식 결과 계약을 사용한다. 서버 계약 변경은 응답 필드 추가로 먼저 이행하고, 웹은 필드가 없는 응답에서도 결과 범위를 과장하지 않는 기본 표시를 제공한다. 경매·코드 검증은 공식 결과 작업의 선행 조건이 아니다.
|
||||
|
||||
| 회귀 시나리오 | 기대 화면/동작 |
|
||||
| --- | --- |
|
||||
| 감사의 8팀 대회 | 대회 헤더에 첫 팀 쌍 `0:2`가 보이지 않음. 첫 세트는 나물장수의 해당 세트 승리를, 별도 시리즈 맥락은 해당 시리즈 `2:0`을 보여 줌. [재현 화면](../ux-audit-2026-11-10/evidence/comparison-event-vs-series.jpg) |
|
||||
| 2팀 고정 세트 무승부, 4/8팀 더블 엘리미네이션, 라운드 로빈 공동 1위, 같은 팀 재대결 | 형식에 맞는 종합 결과. 공식 승자/순위만 표시하며 동일 팀 대결을 분리. |
|
||||
| 부전승·기권승·판정승·판정 무승부·리셋 미활성 | 가짜 `0:0` 없음. 인정 세트가 있으면 올바른 세트만 열 수 있음. |
|
||||
| 슬롯 번호가 1, 2, 7로 건너뜀 / 기존 `/game/7` 링크 / 결과 되돌리기 | 보이는 시리즈 내 번호와 전역 URL 번호가 구분됨. 요청 번호와 다른 세트로 이동하지 않음. 정정 직후 이전 분석을 새 결과에 붙이지 않음. |
|
||||
| 통계 요청 일부 실패 / 0세트 / 실제 승률 0% | 다른 섹션은 계속 보이며, 실패·표본 없음·실측 0을 구분. |
|
||||
|
||||
검증은 API 상태 결정과 DTO의 회귀 테스트, 웹의 표시 결정·링크 선택 테스트, 그리고 390px와 데스크톱에서 위 사례를 확인하는 순서로 진행한다. 기존 `match-public.presenter`, `community-stats.service`, `competition-series-history`, `match-team-progress-view`, `internal-match-game-selection`, `auction-state` 테스트를 재사용하고 기존 테스트에 없는 재대결·상태 경합에만 사례를 추가한다. 구현 후 `pnpm --filter web test`, `pnpm --filter web build`와 변경한 API 모듈 테스트를 실행한다. 쓰기가 필요한 재현은 격리된 fixture에서 검증한다.
|
||||
@@ -0,0 +1,21 @@
|
||||
# 06. 토큰·프리미티브·컴포넌트·기능 우선 검토
|
||||
|
||||
이 문서는 조작과 접근성 검토를 보관한다. 현재 먼저 진행할 시각 개선의 범위는 [심미성 중심 검토](07-visual-design-review.md)에 있다.
|
||||
|
||||
기준은 `f649490`의 현재 웹 소스와 기존 브라우저 감사다. 먼저 **액션과 링크의 대비, 경기 분석 탭의 키보드 동작, 경매 확인창의 포커스**를 개선한다. 이 세 항목은 참가·경매·코드 발급 상태를 해석하거나 전적 API를 바꾸지 않고 검증할 수 있다. 실제 화면에서 재현한 사례와 코드에서 발견한 위험을 아래에서 구분했다. [기존 디자인 시스템 감사](03-design-system.md)
|
||||
|
||||
| 순서 | 영역 | 현재 증거 | 변경 후보와 통과 조건 |
|
||||
| --- | --- | --- | --- |
|
||||
| 1 | 디자인 토큰 | 이전 브라우저 계측값의 sRGB 근사치로 라이트 코랄 링크/흰 표면은 약 3.27:1, 코랄 버튼/밝은 글자는 약 3.08:1이다. 다크 기본 primary 버튼 조합도 약 4.14:1이었다. 실제 배경 합성과 상호작용 상태는 적용 후 측정해야 한다. | `action` 버튼 전경·배경, `link` 전경, `focus` 링을 독립 토큰으로 정의한다. 홈의 전적 링크, 경기 분석의 선택 탭·포커스, 개인 전적의 갱신 버튼에 먼저 적용한다. 라이트·다크에서 일반 크기 글자 4.5:1, 기능을 식별하는 경계·선택 표시 3:1을 해당 표면에서 확인한다. 선택과 포커스는 서로 구분된다. [CSS](../../apps/web/src/index.css#L103) · [갱신 버튼](../../apps/web/src/pages/UserHistoryPage.tsx#L1363) · [WCAG 2.2](https://www.w3.org/TR/WCAG22/#contrast-minimum) |
|
||||
| 2 | `Tabs` 프리미티브 | 내전 상세에서는 좌우·Home/End 키와 `tabIndex` 이동이 구현돼 있다. 경기 분석 탭에서는 브라우저에서 방향키가 동작하지 않았고 버튼 3개가 모두 Tab 순서에 들어갔다. | 내전 상세의 키보드 패턴을 기준으로 분석 탭을 고친다. 탭 그룹에는 한 번의 Tab으로 진입하고 좌우·Home/End로 이동한다. 선택 탭과 패널을 연결한다. 내전 상세의 sticky 위치, URL 및 스크롤 보정은 해당 화면에 둔다. 경매 탭은 분석 탭 검증 후 적용 여부를 결정한다. [내전 상세 탭](../../apps/web/src/components/competition/MatchDetailTabBar.tsx#L46) · [분석 탭](../../apps/web/src/components/InternalGameAnalysisTabs.tsx#L954) · [WAI-ARIA Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) |
|
||||
| 3 | `Dialog` 프리미티브 | 기존 브라우저 감사에서 경매 취소창을 Escape로 닫은 뒤 포커스가 트리거로 돌아가지 않았다. 취소·되돌리기·참여자 추가는 각각 모달 컨테이너를 구현한다. | 경매 취소·되돌리기부터 초기 포커스, 모달 안의 Tab 이동, Escape, 닫힌 뒤 포커스 복귀를 검증한다. 진행 중 요청이 있을 때 닫기 동작을 일관되게 한다. 키보드만으로 열기·확인 입력·닫기까지 수행할 수 있다. 같은 동작이 안정되면 참여자 추가에 재사용한다. [경매 모달](../../apps/web/src/pages/AuctionPage.tsx#L2466) · [참여자 모달](../../apps/web/src/pages/MatchDetailPage.tsx#L751) · [WAI-ARIA Dialog](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) |
|
||||
| 4 | 세트 선택 컴포넌트·기능 | 390px 화면에서 약 300px 영역에 세트 링크 2,048px가 들어갔다. 현재 링크는 색으로만 구분하고 `aria-current`를 제공하지 않는다. | 현재 세트와 이전·다음, 전체 목록 열기를 좁은 화면에서 우선 제공한다. 기존 게임 링크와 선택 규칙을 사용한다. 예를 들어 기록이 1·2·7이면 2의 다음은 존재하는 7이다. 현재 링크는 `aria-current="page"`와 눈에 보이는 선택 표시를 갖는다. [세트 선택 코드](../../apps/web/src/pages/MatchGameDetailPage.tsx#L1505) · [390px 캡처](evidence/L26-mobile-game.jpg) |
|
||||
| 5 | 통계 상태 컴포넌트·기능 | 인사이트 미응답을 `?? 0`으로 렌더하고, 순위 응답이 없으면 빈 배열을 넘긴다. 스테이징 값의 정상 여부와 무관하게 로딩·실패·빈 데이터가 같은 표현을 공유하는 분기가 있다. | 최근 내전·선수 순위·하이라이트에 각자의 `불러오는 중`, `조회 실패`, `이 조건에 기록 없음`, `표본 부족`을 제공한다. 실제 0%는 유효한 분모가 확인될 때만 표시한다. 다른 섹션을 유지하며 실패한 영역만 다시 요청한다. 첫 작업은 현재 query 상태로 할 수 있는 분리부터 적용한다. 승패 유효 분모가 추가로 필요하면 통계 계약에서 확인한다. [현재 코드](../../apps/web/src/pages/CommunityInternalStatsPage.tsx#L349) |
|
||||
| 6 | `Tooltip`·`Popover`, 아이템 및 랭크 | 아이템은 hover/focus에서 설명을 띄우지만 명시적인 터치·Escape 처리 경로가 없다. 아이템마다 Tab으로 들어가고 랭크는 별도의 `data-tip`을 사용한다. 터치와 키보드의 실제 영향은 확인 대상이다. | 빌드 패널에서 아이템 이름과 필수 정보를 터치·키보드로 열고 Escape로 닫을 수 있게 한다. 여러 아이템이 있는 표에서 Tab 이동이 과도하게 늘어나는지도 확인한다. 스타일만 비슷한 랭크 배지를 즉시 같은 동작으로 묶을 필요는 없다. [아이템 동작](../../apps/web/src/components/ItemTooltip.tsx#L159) · [랭크 배지](../../apps/web/src/components/RankBadge.tsx#L44) |
|
||||
| 7 | 채팅 입력 기능 | 코드에서 Shift 없는 Enter를 바로 전송하고 한글 조합 여부를 확인하는 조건이 없다. 메시지 개수가 바뀔 때 항상 맨 아래로 스크롤한다. 실제 브라우저·IME 조합은 미검증이다. | 한글 조합을 확정하는 Enter는 전송하지 않고, 일반 Enter와 Shift+Enter의 기존 의미를 유지한다. 이전 채팅을 읽을 때 새 메시지가 도착해도 위치를 보존한다. 실제 한국어 IME 및 테스트용 연결에서 확인한다. [채팅 구현](../../apps/web/src/pages/AuctionPage.tsx#L2787) |
|
||||
|
||||
토큰 도입 범위는 증거가 있는 용도부터 잡는다. 코랄·바이올렛·골드·시안의 원색과 대진표의 의미 팔레트는 계속 쓸 수 있다. 기존 `primary`를 한 번에 바꾸면 `.competition-series-history`의 코랄 강조와 다크 테마 계약까지 같이 바뀐다. 따라서 액션·링크의 사용처를 옮기고, 전체 알파 호환 클래스 정리, radius 전역 규칙, 타이포·간격·표면 정리는 영향을 확인하면서 뒤에 진행한다. `design-tokens.test.ts`는 원색과 CSS 매핑을 확인하므로 실제 대비 검증과 역할이 다르다. [CSS](../../apps/web/src/index.css#L81) · [기존 토큰 테스트](../../apps/web/test/design-tokens.test.ts)
|
||||
|
||||
공통 컴포넌트는 확인된 사용처에서 시작한다. `Button` 전면 교체 없이 액션·링크 스타일과 초점 기준을 먼저 맞출 수 있다. `Field`는 관리자 검색·티어 선택처럼 라벨과 오류 연결이 필요한 실제 사용처에서 설계한다. `Badge`는 경기 결과, 팀, 티어가 같은 색 의미를 공유하지 않도록 역할별로 나눈다. 터치 44px 목표는 주요 **조작 요소**에 적용하며 티어 배지 같은 읽기 전용 정보의 시각 크기와 구분한다. 기존 팀 코드 복사에는 44px급 높이와 라이브 피드백이 있어 동작을 재사용할 근거가 있다. [기존 복사 버튼](../../apps/web/src/components/competition/TeamTournamentCodes.tsx#L168)
|
||||
|
||||
첫 구현은 **액션·링크 대비와 경기 분석 Tabs**다. 같은 경기 분석 화면에서 라이트·다크, 390px와 데스크톱, 마우스·Tab·방향키를 함께 확인할 수 있다. 확인창은 입력·취소·대기·포커스 복귀 검증이 달라 다음 변경으로 검토한다. 세트 선택과 통계 상태는 이어지는 화면 내부 기능 작업이다. [결과 표시 명세](../specs/match-status-and-result-presentation.md)는 공식 데이터 연결이 필요한 별도 작업으로 보관한다. 경매 상태와 코드 발급 대기는 정상 데이터로 재현되기 전까지 관찰 항목이다.
|
||||
@@ -0,0 +1,65 @@
|
||||
# 07. 심미성 중심의 UI 개선 검토
|
||||
|
||||
추천 방향은 **e스포츠 중계 화면의 선명한 위계와 차분한 데이터 패널**이다. 홈에는 다음 내전, 경매에는 현재 선수와 팀, 경기 분석에는 경기 요약과 흐름이 첫인상을 결정하도록 한다. LOLYMPUS의 각진 형태와 코랄은 살릴 만하다. 화면마다 가장 중요한 정보에만 강한 색·큰 글자·뚜렷한 표면을 주고, 주변 요소의 테두리와 채도를 낮추면 제품의 인상이 선명해진다.
|
||||
|
||||
로컬 스테이징에서 홈, 경매, 시리즈 일정, 경기 분석, 커뮤니티 전적을 다시 캡처했다. 경매와 경기 분석은 라이트·다크를 비교했다. 경매에서 본 유찰과 전적 지표의 값은 레이아웃을 볼 수 있는 표본으로만 사용했다. 캡처의 회색 마스크는 로컬 개발 인증 패널이 있던 영역이다.
|
||||
|
||||
## 가장 큰 시각적 문제
|
||||
|
||||
| 화면 | 현재 인상과 원인 | 시각적 개선 방향 |
|
||||
| --- | --- | --- |
|
||||
| 경매 | 1280 CSS px에서 4열 너비가 **260 / 149 / 440 / 320px**였다. 149px 영역을 팀 카드 두 개가 나눠 카드 하나가 약 **66px**가 됐다. 팀장 이름은 한 글자씩 줄바꿈되고 포인트는 옆 칸을 침범한다. 대기 목록과 채팅이 차지한 면적에 비해 팀 정보의 존재감이 작다. | 팀 카드의 최소 너비를 먼저 확보한다. 좁은 데스크톱에서는 현재 선수와 팀을 두 주 영역으로 두고 대기 목록과 채팅을 하단에 배치한다. 넓은 화면에서만 보조 열을 펼친다. 팀 이름과 포인트를 같은 줄에 정렬하고, 팀장과 로스터는 한 단계 아래에 둔다. [1280px 캡처](evidence/V11-auction-team-width.jpg) · [다크 경매](evidence/V07-auction-dark.jpg) · [현재 그리드](../../apps/web/src/pages/AuctionPage.tsx#L2253) |
|
||||
| 홈 | 다음 내전, 예정 없음, 지난 기록이 비슷한 얇은 테두리와 배경을 사용한다. 다음 내전 카드는 제목 옆 상태, 노란 정원 배지, 보라 버튼, 코랄 전적 링크가 동시에 눈을 끈다. 빈 예정 상자는 카드 높이에 가까운 공간을 쓴다. | 다음 내전만 배경 톤과 제목 크기를 확실히 달리한다. 날짜·맵·인원을 하나의 메타데이터 행으로 묶고, 상태 배지는 낮은 채도를 쓴다. 빈 예정 영역은 작은 안내 행으로 줄여 카드 사이에 크고 빈 사각형이 남지 않게 한다. [홈](evidence/V01-home-light.jpg) |
|
||||
| 대회 상세·시리즈 일정 | 제목, 탭, 날짜 그룹, 경기 행의 시작점이 여러 박스에 나뉘고 두 팀 사이 점수가 넓은 공백 속에 놓인다. 일정 그룹과 경기 행이 비슷한 시각 무게를 가진다. | 날짜는 짧은 구획 제목으로, 경기 행은 `시간·라운드 / 대결과 점수 / 상세`의 정렬된 표로 처리한다. 승리 팀은 무게를 더하고 점수는 고정 숫자 폭으로 맞춘다. 카드 전체를 겹쳐 감싸는 선 대신 행 구분선을 쓴다. [시리즈 일정](evidence/V04-series-light.jpg) |
|
||||
| 경기 분석 | 헤더와 세트 선택, 밴, 오브젝트, 골드 비교가 작은 상자와 선으로 이어진다. 라이트에서 코랄인 선택 강조가 다크에서 보라로 바뀌고, 진영 색·팀 이름 색·승리 강조가 같은 시야 안에서 경쟁한다. | 헤더의 대표 결과와 두 팀 이름을 한 덩어리로 묶고, 세트 선택은 낮은 무게의 한 줄로 구성한다. 오브젝트는 하나의 띠에 나란히 놓는다. 경기 흐름 그래프에는 면적을 더 주고 격자선과 사건 점의 무게를 줄인다. 팀 식별·진영·선택 색은 위치와 역할을 나눠 쓴다. [라이트 경기](evidence/V05-game-light.jpg) · [다크 경기](evidence/V06-game-dark.jpg) |
|
||||
| 커뮤니티 전적 | 하이라이트 카드 다섯 개가 모두 같은 비중을 차지한다. 최근 내전 카드의 오른쪽에 큰 로스터가 들어가며, 세로 가운데 정렬 때문에 제목 위에 큰 공백이 생겼다. | 대회 제목과 시간은 항상 카드 위에 정렬한다. 하이라이트는 값이 있는 항목 중심으로 한 줄의 지표 띠에 모으고, 로스터는 소규모 아바타 묶음과 팀 수로 압축한다. 전체 로스터는 현재 상세 화면에서 볼 수 있다. [커뮤니티 전적](evidence/V08-records-light.jpg) · [카드 배치](../../apps/web/src/pages/CommunityInternalStatsPage.tsx#L84) |
|
||||
|
||||

|
||||
|
||||
## 디자인 토큰 후보
|
||||
|
||||
아래 수치는 시안을 잡기 위한 시작값이다. 최종 팔레트와 크기는 홈·경매·경기 분석을 실제로 그린 뒤 결정한다.
|
||||
|
||||
| 토큰 | 권장 방향 |
|
||||
| --- | --- |
|
||||
| 브랜드·선택 | 코랄을 현재 상태, 활성 탭, 주 액션처럼 시선을 모으는 위치에 쓴다. 라이트와 다크는 서로 다른 색조를 쓰더라도 코랄의 역할은 같다. 바이올렛은 장식 또는 한정된 강조에 둔다. 골드는 우승이나 최고 기록처럼 드문 곳에 남긴다. |
|
||||
| 팀·진영 | 팀 카드는 중립 표면을 공유하고 얇은 옆선 또는 팀 이름 표시에만 팀 색을 준다. 블루·레드는 실제 게임 진영과 그래프의 방향을 설명할 때 쓴다. 팀 번호와 로고·아바타로도 팀을 알아볼 수 있게 한다. |
|
||||
| 표면 | **바탕 / 데이터 패널 / 현재 집중 패널** 세 단계로 먼저 제한한다. 라이트는 뉴트럴 바탕과 흰 패널, 다크는 짙은 잉크색 바탕과 한 단계 밝은 패널. 화면의 층위는 색조와 간격을 먼저 쓰고, 그림자는 팝업과 떠 있는 조작 영역에 제한한다. |
|
||||
| 글자 | Asta Sans를 유지하고 역할의 차이를 키운다. 페이지 제목은 `28–32px`, 섹션 `18–20px`, 본문 `14–15px`, 메타 `12px`부터 비교한다. 현재가·남은 시간·스코어는 `28–36px`의 고정 폭 숫자를 써서 이름과 작은 배지보다 먼저 보이게 한다. |
|
||||
| 공간 | `4 / 8 / 12 / 16 / 24 / 32px`를 기본 단위로 사용한다. 표 행은 촘촘하게, 섹션 사이와 대표 정보 주변은 넉넉하게 둔다. 경매의 현재 선수 카드와 홈의 다음 내전에 같은 패널 패딩을 적용할 수 있다. |
|
||||
| 모서리·선 | 대진과 데이터 표는 각진 인상을 유지한다. 카드·입력·메뉴에는 `4–8px` 범위를 시험하고, 아바타는 형태에 맞게 따로 정한다. 전역 `border-radius: 0 !important`를 옮길 때는 대표 화면부터 시각 차이를 확인한다. 패널 외곽선과 표의 행 구분선은 무게를 달리한다. [현재 스타일](../../apps/web/src/index.css#L182) |
|
||||
|
||||
## 프리미티브와 컴포넌트의 모양
|
||||
|
||||
| 단위 | 제안 |
|
||||
| --- | --- |
|
||||
| 버튼·링크·탭 | 한 화면의 주요 액션만 채운 버튼으로 둔다. 보조 액션은 얇은 외곽선이나 텍스트 버튼으로 표현한다. 선택 탭은 일관된 밑줄과 낮은 채도의 배경을 쓴다. 페이지마다 다른 보라·코랄 버튼이 주 행동을 두고 경쟁하는 경우를 먼저 줄인다. |
|
||||
| 배지·칩 | 상태, 티어, 포지션, 맵을 같은 모양과 채도로 강조하지 않는다. 상태는 연한 바탕과 한 단어, 티어는 작은 정사각 표식, 포지션은 아이콘과 텍스트, 맵은 메타 문구로 표현한다. 여러 색 배지가 한 줄을 덮는 곳부터 정리한다. |
|
||||
| 카드·구분선 | 카드의 **대표 정보 / 보조 정보 / 조작** 위치를 고정한다. 패널 안에 카드가 또 들어갈 때는 내부 카드에 동일한 외곽선을 반복하지 않고 여백이나 구분선을 사용한다. |
|
||||
| 아바타·이미지 | 아이템·룬·챔피언·프로필이 시각적으로 같은 우선순위를 가지지 않게 한다. 현재 선수나 대표 챔피언 이미지는 크게, 명단 아이콘은 같은 크기로 작게, 누락 이미지는 중립 자리표시자로 둔다. |
|
||||
| 표·점수·차트 | 숫자 열을 정렬하고 구획 제목과 경기 행의 무게를 분리한다. 점수는 팀 이름과 가깝게 두고, 그래프는 하나의 대표선과 옅은 격자에서 시작한다. 같은 색이 ‘선택’과 ‘승리’를 동시에 뜻하는 배치는 피한다. |
|
||||
|
||||
경매 카드의 폭 기준은 **180–200px를 시안 출발점**으로 삼을 수 있다. 두 열이면 팀 영역에 약 `372–412px`가 필요하다. 현재 4열의 보조 패널을 유지한 채 폰트만 줄이면 한글 이름과 숫자의 충돌이 남는다. 넓은 데스크톱, 1280px 전후, 390px에서 4팀과 8팀·긴 팀명·빈 로스터를 나란히 비교해 언제 열을 줄일지 정한다.
|
||||
|
||||
## 레퍼런스에서 가져올 시각 원리
|
||||
|
||||
- **OP.GG:** 프로필 아이콘과 이름을 먼저 읽고, 그 아래에서 랭크·탭·전적을 고른다. LOLYMPUS 경매도 현재 선수의 이름·포지션·현재가를 가장 큰 시각 단위로 만들고 전적 지표를 그 아래에 붙일 수 있다. [OP.GG 프로필](https://op.gg/lol/summoners/kr/Hide%20on%20bush-KR1) · [캡처](evidence/V09-opgg-profile.jpg)
|
||||
- **Mobalytics:** 짙은 셸, 선수 프로필 패널, 데이터 패널의 표면 차이가 각 구역을 나눈다. LOLYMPUS에서는 경기 분석의 대표 헤더에만 가장 큰 시각 대비를 두고 표·룬·타임라인은 차분한 패널을 공유하는 방식이 맞다. [Mobalytics 프로필](https://mobalytics.gg/lol/profile/kr/hide%20on%20bush-kr1/overview) · [캡처](evidence/V10-mobalytics-profile.jpg)
|
||||
- One UI의 차분한 표면과 작은 영역의 강한 강조, SEED의 색·공간·곡률 역할 구분은 위 화면의 인상을 토큰으로 옮길 때 참고할 수 있다. [One UI 색상](https://developer.samsung.com/one-ui/color/system.html) · [SEED Foundations](https://seed-design.io/foundations)
|
||||
|
||||
첫 시안은 **경매 화면의 비례와 팀 카드 → 공통 표면·타이포·버튼 → 홈과 경기 분석에 적용** 순서가 적합하다. 경매는 카드 최소 폭, 선수 헤더, 숫자와 배지, 패널 밀도를 한 화면에서 비교할 수 있고, 홈과 경기 분석에 옮겼을 때 같은 제품으로 보이는지 확인할 수 있다.
|
||||
|
||||
## 실제 소스로 만든 Astryx 경매 시안
|
||||
|
||||
`pnpm run start:web:staging` 실행 후 [경매 시안 열기](http://localhost:5173/match/6af19299357ca736af8a5767/auction?auctionPreview=1). 기존 경매 주소에서 `?auctionPreview=1`을 켜면 로컬 개발 서버에서 시안을 볼 수 있다. `기존 화면 보기`를 누르면 같은 데이터로 기존 화면을 비교할 수 있다.
|
||||
|
||||
현재 경매 시안은 Astryx의 공식 Neutral 테마와 실제 `Card`, `TabList`, `Tab`, `Badge`, `StatusDot`, `Button` 컴포넌트를 사용한다. [Astryx 컴포넌트 카탈로그](https://astryx.atmeta.com/components)
|
||||
|
||||
| 단위 | 시안에서 결정한 기준 |
|
||||
| --- | --- |
|
||||
| 디자인 토큰 | Neutral의 바탕·표면·테두리·대비색과 상태 역할을 사용한다. 시안에 Figtree를 연결하고 한글에는 기존 앱 글꼴을 폴백으로 둔다. |
|
||||
| 프리미티브 | 패널 곡률은 Neutral의 12px이고, 선택 탭은 밑줄로 표시한다. 배지와 연결 점은 상태 역할을 따른다. |
|
||||
| 컴포넌트 | 선수 카드에는 전적을, 팀 카드에는 팀원·포지션·낙찰가 열을 넣었다. 운영과 채팅에 Astryx 버튼을 연결했다. |
|
||||
| 화면 | 920px부터 현재 선수와 팀 현황을 `1 : 1.2`로 배치한다. 팀 카드는 480px부터 두 열이며, 선수 명단과 채팅은 팀 현황 아래에 둔다. |
|
||||
|
||||
[Astryx 원본과 비교](evidence/AX-reference-comparison.jpg) · [라이트](evidence/AX-preview-1280-light.jpg) · [다크](evidence/AX-preview-1280-dark.jpg) · [모바일](evidence/AX-preview-390-light.jpg) · [검증 기록](../../design-qa.md)
|
||||
@@ -0,0 +1,46 @@
|
||||
# LOLYMPUS UX/UI 전수 감사
|
||||
|
||||
2026년 11월 10일 KST · 기준 커밋 `f649490cd270aba9e165533c04cb5e277424b6d4`
|
||||
|
||||
개편은 **색·표면·타이포·여백과 카드 구성**부터 진행한다. 경매의 화면 비례와 팀 카드가 첫 시안 대상이다. [심미성 중심 검토](07-visual-design-review.md)
|
||||
|
||||
결과 표시에서는 8팀 대회 전적 헤더에 한 시리즈의 `0:2`가 대회 점수처럼 보이고, 바로 아래 첫 경기는 다른 두 팀의 경기였다. 첫 시리즈 요약을 대회 헤더에 넣는 코드도 확인했다. [전적 상세](evidence/L05-internal-match.jpg)
|
||||
|
||||
경매에서 `팀빌딩 완료`와 `유찰`이 함께 보인 사례, 팀 진행에서 코드가 `발급 대기`였던 사례는 스테이징 관찰이다. 당시 데이터의 정상 전이와 발급 예정 시점은 확인하지 못했다. 두 사례는 정상 데이터에서 재현한 뒤 수정 여부를 정한다. [내전 상세](evidence/L02-match.jpg) · [경매](evidence/L03-auction.jpg) · [코드 상태](evidence/L14-team-state.jpg)
|
||||
|
||||

|
||||
|
||||
| 문서 | 확인할 내용 |
|
||||
| --- | --- |
|
||||
| [01. 사용자 흐름과 개선 항목](01-user-flows.md) | 방문자, 참가자, 팀장, 관전자, 운영자, 카카오톡 사용자의 과업별 현재 상태, 세부 문제와 완료 기준 |
|
||||
| [02. 비교 서비스 조사](02-reference-comparison.md) | OP.GG·LOL.PS·포로지지·Blitz·Tracker·Mobalytics를 기능별로 대조하고, 대회 운영은 Toornament와 Riot 공개 자료로 보완 |
|
||||
| [03. 디자인 토큰·프리미티브·컴포넌트](03-design-system.md) | 실제 대비와 컴포넌트 인벤토리, One UI·SEED·GitHub 오픈소스 비교, 상태와 접근성 계약 |
|
||||
| [04. 개편 순서와 검증 기준](04-delivery-and-validation.md) | 영향과 선행 작업에 따른 우선순위, 테스트 데이터, 릴리스 기준, 후속 검증 계획 |
|
||||
| [05. 커버리지와 현재 구현 색인](05-coverage.md) | 17개 라우트별 관찰 상태, 미검증 분기, CSS 변수 매핑, 기존 웹 테스트 범위 |
|
||||
| [06. UI 개선 우선 검토](06-ui-improvement-review.md) | 토큰·프리미티브·컴포넌트·기능의 첫 적용 대상과 검증 기준 |
|
||||
| [07. 심미성 중심 검토](07-visual-design-review.md) | 현재 화면의 인상, 경매 너비 실측, 화면별 디자인 토큰·카드·표의 시각 개선 방향 |
|
||||
|
||||
## 검증 범위
|
||||
|
||||
- `pnpm run start:web:staging`으로 실행한 로컬 웹과 스테이징 API를 사용했다. `App.tsx`에 선언된 17개 라우트 모두 브라우저에서 열고, 동적 화면은 실제 예시 내전을 골라 확인했다. 17개에는 경유 화면인 `/auth/callback`과 두 개의 정책 화면도 포함된다. 별도로 존재하지 않는 URL과 잘못된 내전 링크를 비교했다. [라우트](../../apps/web/src/App.tsx#L136)
|
||||
- 비로그인 탐색과 브라우저에 설정돼 있던 스테이징 운영자 컨텍스트의 읽기 화면을 구분했다. 기본 데스크톱, 390px 모바일, 1440px 대진표, 320px 관리 화면 일부를 봤다. 라이트와 다크 토큰을 브라우저에서 읽었고 내전·게임 탭의 방향키, 경매 취소 확인창의 Escape와 포커스 복귀를 비교했다.
|
||||
- 접근 근거는 **브라우저**(화면·DOM·조작), **코드**(분기·데이터 계약), **제안**(개편 방향)으로 나눴다. 서버 집계와 스냅샷에 따른 수치는 해당 시점의 관찰이다. 정적 인벤토리는 `apps/web/src`의 추적 파일 91개를 기준으로 했다. 24개 컴포넌트 경로에는 렌더링 파일 외에 모델·레이아웃 유틸리티도 들어 있다.
|
||||
- 당시 스테이징 목록의 `recruiting` 조회는 0건이었다. 모집 신청·정원 경합, 실제 로그인 완료, 카카오톡 왕복, 입찰·낙찰·동시 접속, 사용 가능한 코드 복사, 경기 결과 판정·취소·재수집, 코드 업로드·백필은 코드와 읽기 화면을 확인했고 최종 동작은 격리된 데이터로 검증해야 한다. 브라우저에서 확인한 경매는 유찰 상태였다. 스크린리더 발화, 실기기 터치, 완전한 WCAG 적합성 검증도 별도 범위다.
|
||||
- 화면 자료에서 일부 스테이징 개발 인증 패널을 가리고, 코드 풀은 목록의 실제 코드가 들어가지 않도록 상단만 남겼다. 개발 패널로 인한 가림은 스테이징 로컬 환경에서 관찰했다. 제품 배포판의 가림 문제로 분류하지 않았다. 외부 캡처의 광고와 팝업은 확인 당시 웹 환경에서 보인 상태다.
|
||||
- 분류한 항목은 흐름·기능 54개, 토큰 20개, 프리미티브 28개, 컴포넌트 26개다. 현재 관찰과 개편 제안을 포함한다. `pnpm --filter web test` 기준 기존 테스트 144개가 통과했다. 테스트는 모델과 일부 UI 계약의 기준선이며 전체 사용자 흐름을 대체하지 않는다.
|
||||
|
||||
## 화면별 판정
|
||||
|
||||
| 단계 | 판정 | 화면 근거 |
|
||||
| --- | --- | --- |
|
||||
| 1. 홈 → 내전 찾기 | 과거 검색이 어렵다. 날짜 기준 분류가 실제 운영에서 활성 내전 탐색을 방해하는지는 정상 사례로 확인한다. | [홈](evidence/L01-home.jpg) · [390px 홈](evidence/L24-mobile-home.jpg) |
|
||||
| 2. 내전 상세 → 신청·계정 연결 | 핵심 전환 재검증 필요. 모집 표본이 없으며 비로그인·미등록·마감 분기는 코드로 분석했다. | [내전 상세](evidence/L02-match.jpg) · [안내](evidence/L37-match-info.jpg) · [로그인](evidence/L16-login.jpg) |
|
||||
| 3. 팀빌딩 → 경매 | 정상 흐름의 상태 표시 재현 대기. 모바일 정보 배치와 취소창 포커스 복귀는 별도 관찰이다. | [경매](evidence/L03-auction.jpg) · [모바일](evidence/L27-mobile-auction.jpg) · [취소 확인](evidence/L31-auction-cancel.jpg) |
|
||||
| 4. 대회 → 대진·순위·일정·팀 | 공식 대진과 일정 탭이 동작한다. 라운드 이름과 내 팀 중심 탐색을 개선할 여지가 있다. | [더블 엘리미네이션](evidence/L28-wide-bracket.jpg) · [라운드 로빈](evidence/L21-round-robin.jpg) · [일정](evidence/L10-series.jpg) · [팀](evidence/L11-teams.jpg) |
|
||||
| 5. 팀 선택 → 다음 경기·코드 | 대진 준비와 코드 발급 대기가 함께 표시됐다. 이 조합은 정상일 수 있으며 발급 실패나 사용자 혼동은 확인하지 못했다. | [팀 선택](evidence/L13-team-progress.jpg) · [발급 대기](evidence/L14-team-state.jpg) · [모바일](evidence/L15-mobile-team.jpg) |
|
||||
| 6. 내전 전적 → 대회 결과 | 개선 우선. 커뮤니티 집계 상태와 대회·시리즈·세트 점수의 범위를 분리해야 한다. | [커뮤니티 전적](evidence/L04-leaderboard.jpg) · [대회 전적](evidence/L05-internal-match.jpg) |
|
||||
| 7. 세트 → 타임라인·스코어보드·라인전·빌드 | 분석 데이터가 풍부하다. 모바일 세트 선택, 키보드 탭, 비교 시점 표기가 발목을 잡는다. | [요약·타임라인](evidence/L06-game-scoreboard.jpg) · [라인전](evidence/L07-game-lane.jpg) · [빌드](evidence/L08-game-build.jpg) · [390px 세트](evidence/L26-mobile-game.jpg) · [공개 세트 링크](evidence/L43-public-game.jpg) |
|
||||
| 8. 선수 → 개인 전적 | 큐와 시즌 변경이 가능하다. 검색 진입과 갱신 기준, 빈 결과의 의미를 개선해야 한다. | [내전 개인 전적](evidence/L22-user-profile.jpg) · [협곡 전적](evidence/L23-user-solo.jpg) |
|
||||
| 9. 운영자 → 개설·판정·수집·코드·이관 | 주요 화면과 권한 실패를 확인했다. 실행 전 범위·영향 미리보기와 작업 완료 후 회복 경로가 필요하다. | [관리 목록](evidence/L17-admin-matches.jpg) · [개설](evidence/L32-admin-create.jpg) · [공식 판정](evidence/L12-competition-ops.jpg) · [코드](evidence/L18-admin-codes.jpg) · [백필](evidence/L19-admin-import.jpg) · [과거 내전](evidence/L20-admin-legacy.jpg) · [권한 없음](evidence/L42-admin-denied.jpg) |
|
||||
| 10. 경유·실패·보조 화면 | 잘못된 내전에는 안내가 있다. 미등록 경로는 헤더와 푸터 사이가 비어 있고, 직접 들어간 콜백은 인증 결과에 대한 설명이 없다. | [미등록 경로](evidence/L36-not-found.jpg) · [잘못된 내전](evidence/L40-missing-match.jpg) · [콜백](evidence/L33-callback.jpg) · [약관](evidence/L34-terms.jpg) · [개인정보처리방침](evidence/L35-privacy.jpg) |
|
||||
| 11. 카카오톡 → 등록·신청·취소·이관 | 서버 명령과 오류 분기를 확인했다. 실제 채팅에서 보내고 받는 흐름은 검증 대기다. | [명령 파서](../../apps/api/src/modules/dakao/parsers/command.parser.ts#L44) |
|
||||
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 56 KiB |