fix(web): improve compact UI readability

This commit is contained in:
dahyeon committed 2026-06-09 03:12:00 -07:00
1 parent 12869a7e9e
commit 5ba68ea134
16 files changed
+483 -357

No files matched your search

+46 -46
View File
@@ -143,7 +143,7 @@ function FilterButton({
<button
type="button"
onClick={onClick}
className={`px-3 py-2 text-[12px] font-semibold border-b-2 transition-colors ${
className={`px-3 py-2 text-xs font-semibold border-b-2 transition-colors ${
active
? "border-primary text-primary bg-primary/5"
: "border-transparent text-base-content/45 hover:text-base-content"
@@ -194,14 +194,14 @@ function SummaryCard({
}) {
return (
<div className="border border-base-content/8 bg-base-100 p-4">
<div className="text-[10px] font-bold uppercase tracking-wider text-base-content/30">
<div className="text-xs font-bold uppercase tracking-wider text-base-content/30">
{label}
</div>
<div className="mt-2 text-2xl font-black text-base-content tabular-nums">
{value}
</div>
{sub && (
<div className="mt-1 text-[11px] text-base-content/40">{sub}</div>
<div className="mt-1 text-xs text-base-content/40">{sub}</div>
)}
</div>
);
@@ -231,7 +231,7 @@ function ChampionStatsTable({
<div className="overflow-x-auto">
<table className="w-full text-left min-w-[860px]">
<thead>
<tr className="bg-base-200/50 border-b border-base-content/10 text-[11px] text-base-content/35 uppercase tracking-wider">
<tr className="bg-base-200/50 border-b border-base-content/10 text-xs text-base-content/35 uppercase tracking-wider">
<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>
@@ -262,48 +262,48 @@ function ChampionStatsTable({
championId={row.championId}
manifest={manifest}
/>
<span className="text-[13px] font-bold text-base-content">
<span className="text-sm font-bold text-base-content">
{displayName}
</span>
</div>
</td>
<td
className={`px-3 py-2.5 text-center text-[13px] font-bold ${ratioClass(row.winRate)}`}
className={`px-3 py-2.5 text-center text-sm font-bold ${ratioClass(row.winRate)}`}
>
{row.winRate}%
</td>
<td className="px-3 py-2.5 text-center text-[12px] tabular-nums">
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
{row.games}
</td>
<td className="px-3 py-2.5 text-center text-[12px] tabular-nums text-base-content/55">
<td className="px-3 py-2.5 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>
</td>
<td
className={`px-3 py-2.5 text-center text-[13px] font-bold tabular-nums ${kdaClass(row.kda)}`}
className={`px-3 py-2.5 text-center text-sm font-bold tabular-nums ${kdaClass(row.kda)}`}
>
{row.kda}
</td>
<td className="px-3 py-2.5 text-center text-[12px] tabular-nums">
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
{row.totalKills}
</td>
<td className="px-3 py-2.5 text-center text-[12px] tabular-nums">
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
{row.totalDeaths}
</td>
<td className="px-3 py-2.5 text-center text-[12px] tabular-nums">
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
{row.totalAssists}
</td>
<td className="px-3 py-2.5 text-center text-[12px] tabular-nums text-base-content/55">
<td className="px-3 py-2.5 text-center text-xs tabular-nums text-base-content/55">
{row.doubleKills}/{row.tripleKills}/{row.quadraKills}/
{row.pentaKills}
</td>
<td className="px-3 py-2.5 text-center text-[12px] tabular-nums">
<td className="px-3 py-2.5 text-center text-xs tabular-nums">
{row.avgCs} · {row.avgCsPerMin}/m
</td>
<td className="px-3 py-2.5 text-center">
<button
type="button"
className={`text-[11px] px-2 py-1 border ${
className={`text-xs px-2 py-1 border ${
selected
? "border-primary/40 bg-primary/10 text-primary"
: "border-base-content/10 text-base-content/40 hover:text-base-content"
@@ -374,7 +374,7 @@ function TeamMini({
manifest: DdragonManifest | null | undefined;
}) {
return (
<div className="grid sm:grid-cols-2 gap-2 text-[11px]">
<div className="grid sm:grid-cols-2 gap-2 text-xs">
{match.teams.map((team) => (
<div
key={`${match.matchId}-${team.side}`}
@@ -499,7 +499,7 @@ function DetailStatBar({
}) {
return (
<div>
<div className="flex items-center justify-between gap-2 text-[10px] text-base-content/45">
<div className="flex items-center justify-between gap-2 text-xs text-base-content/45">
<span>{label}</span>
<span className="font-bold text-base-content/70 tabular-nums">
{formatCompactNumber(value)}
@@ -524,15 +524,15 @@ function TeamHeader({ team }: { team: ApiRecentMatchTeam }) {
<div className="px-3 py-2 flex flex-wrap items-center justify-between gap-2 border-b border-base-content/10">
<div className="flex items-center gap-2">
<span
className={`text-[11px] font-black uppercase tracking-wider ${sideClass}`}
className={`text-xs font-black uppercase tracking-wider ${sideClass}`}
>
{sideLabel}
</span>
<span className={`text-[11px] font-black ${resultClass}`}>
<span className={`text-xs font-black ${resultClass}`}>
{team.win ? "승리" : "패배"}
</span>
</div>
<div className="flex items-center gap-3 text-[11px] text-base-content/45">
<div className="flex items-center gap-3 text-xs text-base-content/45">
<span>드래곤 {team.objectives?.dragon ?? 0}</span>
<span>바론 {team.objectives?.baron ?? 0}</span>
<span>타워 {team.objectives?.tower ?? 0}</span>
@@ -565,7 +565,7 @@ function ParticipantRow({
return (
<div
className={`grid min-w-[920px] grid-cols-[260px_86px_132px_220px_164px] gap-3 items-center border-b border-base-content/5 border-l-2 px-3 py-2 text-[11px] last:border-b-0 ${
className={`grid min-w-[920px] grid-cols-[260px_86px_132px_220px_164px] gap-3 items-center border-b border-base-content/5 border-l-2 px-3 py-2 text-xs last:border-b-0 ${
isOwner
? "border-l-primary bg-primary/[0.05]"
: "border-l-transparent hover:bg-base-content/[0.02]"
@@ -582,7 +582,7 @@ function ParticipantRow({
/>
) : null}
{participant.championLevel > 0 && (
<span className="absolute bottom-0 right-0 min-w-4 bg-base-300 px-1 text-center text-[9px] font-black leading-4 text-base-content">
<span className="absolute bottom-0 right-0 min-w-4 bg-base-300 px-1 text-center text-xs font-black leading-4 text-base-content">
{participant.championLevel}
</span>
)}
@@ -616,7 +616,7 @@ function ParticipantRow({
>
{participantName}
</div>
<div className="truncate text-[10px] text-base-content/35">
<div className="truncate text-xs text-base-content/35">
{participant.tagLine ? `#${participant.tagLine} · ` : ""}
{(LANE_LABELS[participant.teamPosition] ?? participant.teamPosition) ||
"포지션 없음"}
@@ -632,13 +632,13 @@ function ParticipantRow({
<span className="text-base-content/25"> / </span>
{participant.assists}
</div>
<div className={`mt-0.5 text-[10px] font-bold ${kdaClass(kda)}`}>
<div className={`mt-0.5 text-xs font-bold ${kdaClass(kda)}`}>
{participant.deaths === 0 ? "Perfect" : `${kda} KDA`}
</div>
</div>
<div className="space-y-2 tabular-nums">
<div className="flex items-center justify-between gap-2 text-[10px] text-base-content/45">
<div className="flex items-center justify-between gap-2 text-xs text-base-content/45">
<span>CS</span>
<span className="font-bold text-base-content/70">
{participant.totalCs} ({participant.csPerMin}/m)
@@ -667,7 +667,7 @@ function ParticipantRow({
fillClass="bg-base-content/35"
/>
</div>
<div className="text-[10px] text-base-content/40">
<div className="text-xs text-base-content/40">
시야 {participant.visionScore} · 와드 {participant.wardsPlaced}/
{participant.wardsKilled} · 제어 {participant.controlWardsBought}
</div>
@@ -706,7 +706,7 @@ function MatchDetailPanel({
if (participants.length === 0) {
return (
<div className="p-4 text-center text-[12px] text-base-content/35">
<div className="p-4 text-center text-xs text-base-content/35">
이 경기의 상세 팀 데이터가 아직 없습니다.
</div>
);
@@ -721,7 +721,7 @@ function MatchDetailPanel({
>
<TeamHeader team={team} />
<div className="overflow-x-auto">
<div className="grid min-w-[920px] grid-cols-[260px_86px_132px_220px_164px] gap-3 border-b border-base-content/10 bg-base-200/40 px-3 py-2 text-[10px] font-black uppercase tracking-wider text-base-content/35">
<div className="grid min-w-[920px] grid-cols-[260px_86px_132px_220px_164px] gap-3 border-b border-base-content/10 bg-base-200/40 px-3 py-2 text-xs font-black uppercase tracking-wider text-base-content/35">
<div>소환사</div>
<div className="text-center">KDA</div>
<div>CS · 골드</div>
@@ -766,16 +766,16 @@ function RecentMatchCard({
>
<div className="p-4 grid lg:grid-cols-[120px_1fr_120px_1.5fr_40px] gap-4 items-center">
<div className="text-center lg:text-left">
<div className={`text-[12px] font-black ${resultClass}`}>
<div className={`text-xs font-black ${resultClass}`}>
{match.remake ? "다시하기" : match.win ? "승리" : "패배"}
</div>
<div className="text-[11px] text-base-content/35 mt-1">
<div className="text-xs text-base-content/35 mt-1">
{match.queueLabel}
</div>
<div className="text-[11px] text-base-content/25">
<div className="text-xs text-base-content/25">
{formatDate(match.gameCreation)}
</div>
<div className="text-[11px] text-base-content/25">
<div className="text-xs text-base-content/25">
{formatDuration(match.gameDuration)}
</div>
</div>
@@ -790,7 +790,7 @@ function RecentMatchCard({
<div className="font-bold text-base-content truncate">
{championName}
</div>
<div className="text-[11px] text-base-content/35">
<div className="text-xs text-base-content/35">
Lv.{match.championLevel} ·{" "}
{(LANE_LABELS[match.teamPosition] ?? match.teamPosition) ||
"포지션 없음"}
@@ -814,17 +814,17 @@ function RecentMatchCard({
<span>{match.assists}</span>
</div>
<div
className={`text-[12px] font-bold tabular-nums ${kdaClass(match.kda)}`}
className={`text-xs font-bold tabular-nums ${kdaClass(match.kda)}`}
>
{match.deaths === 0 ? "Perfect" : `${match.kda} 평점`}
</div>
<div className="mt-1 text-[11px] text-base-content/35">
<div className="mt-1 text-xs text-base-content/35">
킬 관여 {match.killParticipation}%
</div>
</div>
<div className="grid sm:grid-cols-[100px_1fr] gap-4 items-center">
<div className="space-y-1 text-[11px] text-base-content/45">
<div className="space-y-1 text-xs text-base-content/45">
<div>
CS{" "}
<span className="font-bold text-base-content/70">
@@ -865,7 +865,7 @@ function RecentMatchCard({
aria-expanded={expanded}
aria-label={expanded ? "상세 전적 접기" : "상세 전적 펼치기"}
>
<span className="text-[11px] font-bold lg:hidden">
<span className="text-xs font-bold lg:hidden">
{expanded ? "상세 접기" : "상세 보기"}
</span>
{expanded ? (
@@ -1156,7 +1156,7 @@ export default function UserHistoryPage() {
<span>최근 저장: {formatLastFetched(profile.lastFetchedAt)}</span>
</div>
</div>
<div className="border border-dashed border-base-content/10 px-3 py-2 text-[11px] text-base-content/35 sm:text-right space-y-2">
<div className="border border-dashed border-base-content/10 px-3 py-2 text-xs text-base-content/35 sm:text-right space-y-2">
<div>
{isInternalQueue ? (
<>
@@ -1186,7 +1186,7 @@ export default function UserHistoryPage() {
: "정보 갱신"}
</button>
{!isInternalQueue && (
<div className="text-[10px] text-base-content/25">
<div className="text-xs text-base-content/25">
갱신 소켓: {refreshSocket.connectionStatus}
</div>
)}
@@ -1239,14 +1239,14 @@ export default function UserHistoryPage() {
))}
</div>
) : (
<div className="px-3 py-2 text-[11px] text-base-content/40">
<div className="px-3 py-2 text-xs text-base-content/40">
내전 탭은 토너먼트 코드 결과 수집 데이터를 기준으로 집계합니다.
</div>
)}
{selectedChampionName && (
<button
type="button"
className="text-[11px] px-2.5 py-1 border border-primary/30 text-primary bg-primary/5"
className="text-xs px-2.5 py-1 border border-primary/30 text-primary bg-primary/5"
onClick={() => updateSearch({ championId: null })}
>
{selectedChampionName} 필터 해제
@@ -1304,7 +1304,7 @@ export default function UserHistoryPage() {
sub="가장 최근 경기 기준"
/>
<div className="border border-base-content/8 bg-base-100 p-4">
<div className="text-[10px] font-bold uppercase tracking-wider text-base-content/30">
<div className="text-xs font-bold uppercase tracking-wider text-base-content/30">
자주 플레이한 챔피언
</div>
<div className="mt-3 flex items-center gap-3">
@@ -1321,13 +1321,13 @@ export default function UserHistoryPage() {
championId={champion.championId}
manifest={ddragon}
/>
<div className="mt-1 text-[10px] text-base-content/40 group-hover:text-primary">
<div className="mt-1 text-xs text-base-content/40 group-hover:text-primary">
{champion.winRate}%
</div>
</button>
))}
{(summary?.topChampions ?? []).length === 0 && (
<span className="text-[11px] text-base-content/25">
<span className="text-xs text-base-content/25">
기록 없음
</span>
)}
@@ -1340,7 +1340,7 @@ export default function UserHistoryPage() {
<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-[11px] text-base-content/35">
<p className="mt-1 text-xs text-base-content/35">
저장된 데이터를 기준으로 집계합니다. 최신 데이터가 반영되지 않을
수 있습니다.
</p>
@@ -1380,7 +1380,7 @@ export default function UserHistoryPage() {
<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-[11px] text-base-content/35">
<span className="text-xs text-base-content/35">
최근 저장: {formatLastFetched(historyLastFetchedAt)}
</span>
</div>