Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function App() {
<Route path="/league/team-stats" element={<LeagueTeamStatsRoute />} />
<Route path="/fixtures/:fixtureId" element={<FixtureDetailRoute />} />
<Route path="/mypage" element={<MyPageRoute />} />
<Route path="/admin" element={<AdminRoute />} />
<Route path="/admin/*" element={<AdminRoute />} />
<Route path="/players/:playerId" element={<PlayerDetailRoute />} />
<Route path="/teams/:teamId" element={<TeamDetailRoute />} />
<Route path="/league/*" element={<Navigate to="/league/overview" replace />} />
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type FixtureSummary = {
round: number | null;
referee: string | null;
venueName: string | null;
venueNameKo: string | null;
homeTeamId: number | null;
awayTeamId: number | null;
homeTeamName: string | null;
Expand Down Expand Up @@ -404,6 +405,7 @@ export type TeamNewsTranslationResult = {
export type TeamVenue = {
venueId: number | null;
venueName: string | null;
venueNameKo: string | null;
venueAddress: string | null;
venueCity: string | null;
capacity: number | null;
Expand Down
1,008 changes: 690 additions & 318 deletions frontend/src/pages/AdminPage.tsx

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions frontend/src/pages/FixtureDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,15 @@ function FixtureDetailHero({
</p>
<strong>{scoreText(fixture)}</strong>
{false && isAdmin ? (
<Link aria-label="관리자 수정" className="admin-edit-link icon" title="관리자 수정" to={`/admin?tab=fixture&id=${fixture.fixtureId}`}>
<Link aria-label="관리자 수정" className="admin-edit-link icon" title="관리자 수정" to={`/admin/editor?tab=fixture&id=${fixture.fixtureId}`}>
<Pencil size={16} aria-hidden="true" />
관리자 수정
</Link>
) : null}
<span className="status-pill">{fixture.fixtureStatus ?? "예정"}</span>
</div>
{isAdmin ? (
<Link aria-label="관리자 수정" className="admin-edit-link icon fixture-admin-edit-link" title="관리자 수정" to={`/admin?tab=fixture&id=${fixture.fixtureId}`}>
<Link aria-label="관리자 수정" className="admin-edit-link icon fixture-admin-edit-link" title="관리자 수정" to={`/admin/editor?tab=fixture&id=${fixture.fixtureId}`}>
<Pencil size={16} aria-hidden="true" />
관리자 수정
</Link>
Expand Down Expand Up @@ -424,7 +424,7 @@ function FixtureDetailHero({
</div>
<div>
<dt>경기장</dt>
<dd>{fixtureInfo(fixture.venueName, "미정")}</dd>
<dd>{fixtureInfo(fixture.venueNameKo?.trim() || fixture.venueName, "미정")}</dd>
</div>
</dl>
</article>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/PlayerDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ function PlayerHero({
/>
) : null}
{isAdmin ? (
<Link aria-label="관리자 수정" className="admin-edit-link icon" title="관리자 수정" to={`/admin?tab=player&id=${profile.playerId}`}>
<Link aria-label="관리자 수정" className="admin-edit-link icon" title="관리자 수정" to={`/admin/editor?tab=player&id=${profile.playerId}`}>
<Pencil size={16} aria-hidden="true" />
</Link>
) : null}
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/pages/TeamDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -732,14 +732,15 @@ function TeamVenueCard({ venue }: { venue: TeamDetails["venue"] }) {

const fullAddress = [venue.venueCity, venue.venueAddress].filter(Boolean).join(" · ");
const addressPopoverId = `team-venue-address-${venue.venueId ?? "current"}`;
const displayVenueName = venue.venueNameKo?.trim() || venue.venueName;

return (
<article className="panel team-venue-card">
<div className="team-venue-image">
{venue.venueImageUrl && !imageFailed ? (
<img
src={venue.venueImageUrl}
alt={venue.venueName ? `${venue.venueName} 경기장` : "팀 경기장"}
alt={displayVenueName ? `${displayVenueName} 경기장` : "팀 경기장"}
onError={() => setImageFailed(true)}
/>
) : (
Expand All @@ -748,7 +749,7 @@ function TeamVenueCard({ venue }: { venue: TeamDetails["venue"] }) {
</div>
<div className="team-venue-info">
<p className="eyebrow">Stadium</p>
<h3>{venue.venueName ?? "경기장 이름 정보 없음"}</h3>
<h3>{displayVenueName ?? "경기장 이름 정보 없음"}</h3>
<dl>
{fullAddress ? (
<div className="team-venue-location">
Expand All @@ -773,7 +774,7 @@ function TeamVenueCard({ venue }: { venue: TeamDetails["venue"] }) {
role="dialog"
aria-label="경기장 전체 주소"
>
<strong>{venue.venueName ?? "경기장 주소"}</strong>
<strong>{displayVenueName ?? "경기장 주소"}</strong>
<span>{fullAddress}</span>
</div>
</>
Expand Down Expand Up @@ -834,7 +835,7 @@ function TeamHero({
/>
) : null}
{isAdmin ? (
<Link aria-label="관리자 수정" className="admin-edit-link icon" title="관리자 수정" to={`/admin?tab=team&id=${team.teamId}`}>
<Link aria-label="관리자 수정" className="admin-edit-link icon" title="관리자 수정" to={`/admin/editor?tab=team&id=${team.teamId}`}>
<Pencil size={16} aria-hidden="true" />
</Link>
) : null}
Expand Down
130 changes: 91 additions & 39 deletions frontend/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4497,6 +4497,9 @@ h2 {

.admin-tab {
flex: 0 0 auto;
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 999px;
padding: 9px 18px;
Expand All @@ -4505,6 +4508,7 @@ h2 {
cursor: pointer;
font-size: 0.92rem;
font-weight: 900;
text-decoration: none;
}

.admin-tab.active {
Expand Down Expand Up @@ -4553,7 +4557,6 @@ h2 {
.admin-search-row button,
.admin-edit-form > button,
.admin-sync-actions button,
.admin-fixture-sync-form button,
.admin-pagination button,
.admin-add-button,
.admin-media-actions button,
Expand All @@ -4575,7 +4578,6 @@ h2 {
.admin-search-row button:hover,
.admin-edit-form > button:hover,
.admin-sync-actions button:hover,
.admin-fixture-sync-form button:hover,
.admin-pagination button:hover,
.admin-add-button:hover,
.admin-media-actions button:hover,
Expand All @@ -4587,7 +4589,6 @@ h2 {
.admin-search-row button:disabled,
.admin-edit-form > button:disabled,
.admin-sync-actions button:disabled,
.admin-fixture-sync-form button:disabled,
.admin-pagination button:disabled,
.admin-add-button:disabled,
.admin-media-actions button:disabled,
Expand All @@ -4596,6 +4597,11 @@ h2 {
opacity: 0.65;
}

.admin-sync-actions button[aria-disabled="true"] {
cursor: not-allowed;
opacity: 0.65;
}

.admin-loading-icon {
width: 15px;
height: 15px;
Expand Down Expand Up @@ -5090,35 +5096,6 @@ h2 {
font-weight: 800;
}

.admin-fixture-sync-form {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 8px;
padding: 0 14px 14px;
}

.admin-fixture-sync-form button {
width: 100%;
}

.admin-fixture-sync-form label {
display: grid;
gap: 5px;
color: #263a2a;
font-size: 0.78rem;
font-weight: 900;
}

.admin-fixture-sync-form input {
width: 100%;
min-height: 38px;
border: 1px solid #c8d5c8;
border-radius: 6px;
padding: 0 10px;
background: #ffffff;
color: #162018;
}

.admin-sync-message {
padding: 0 14px 14px;
}
Expand Down Expand Up @@ -5202,10 +5179,53 @@ h2 {
transition: transform 160ms ease;
}

.admin-sync-job-summary-heading {
display: grid;
gap: 8px;
}

.admin-sync-job-summary-counts {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 5px;
color: #7b857e;
font-size: 0.72rem;
font-weight: 900;
}

.admin-sync-job-summary-counts span {
border-radius: 999px;
padding: 4px 8px;
}

.admin-sync-job-summary-counts .succeeded {
background: #e8efe9;
color: #315c3b;
}

.admin-sync-job-summary-counts .failed {
background: #f9deda;
color: #992f24;
}

.admin-sync-job-summary-counts .cancelled {
background: #e5e7e6;
color: #59605b;
}

.admin-sync-job-summary-counts i {
font-style: normal;
}

.admin-sync-job-section-collapsible[open] > summary svg {
transform: rotate(180deg);
}

.admin-sync-job-section-collapsible .admin-sync-job + .admin-sync-job {
margin-top: 12px;
}

.admin-sync-job-empty {
margin: 0;
padding: 8px 0;
Expand All @@ -5214,8 +5234,24 @@ h2 {

.admin-sync-job.partial_failed,
.admin-sync-job.failed {
border-color: #e3c8bb;
background: #fffaf7;
border-color: #efc4bd;
background: #fff0ee;
}

.admin-sync-job.cancelled {
border-color: #c7ccca;
background: #f1f3f2;
}

.admin-sync-job.partial_failed .status-pill,
.admin-sync-job.failed .status-pill {
background: #f9deda;
color: #992f24;
}

.admin-sync-job.cancelled .status-pill {
background: #dde0de;
color: #59605b;
}

.admin-sync-job-heading > div {
Expand Down Expand Up @@ -5317,6 +5353,17 @@ h2 {
background: #fbfdfb;
}

.admin-log-item.failed {
border-color: #efc4bd;
background: #fff0ee;
}

.admin-log-item.failed .admin-log-result,
.admin-log-item.failed .admin-log-badges .status-pill {
background: #f9deda;
color: #992f24;
}

.admin-log-item strong,
.admin-log-item p {
overflow-wrap: anywhere;
Expand All @@ -5333,21 +5380,27 @@ h2 {
color: #28553a;
}

.admin-utility-section > summary {
.admin-utility-section > summary,
.admin-page-section-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
cursor: pointer;
padding: 14px;
}

.admin-utility-section > summary span {
.admin-utility-section > summary {
cursor: pointer;
}

.admin-utility-section > summary span,
.admin-page-section-heading > span {
display: grid;
gap: 4px;
}

.admin-utility-section > summary strong {
.admin-utility-section > summary strong,
.admin-page-section-heading strong {
color: #213826;
}

Expand Down Expand Up @@ -5530,7 +5583,6 @@ h2 {
.admin-search-row,
.admin-form-grid,
.admin-media-grid,
.admin-fixture-sync-form,
.admin-log-item {
grid-template-columns: 1fr;
}
Expand Down
Loading
Loading