From d0f01a4cc24128433640ea4466b41f1d57b2653b Mon Sep 17 00:00:00 2001 From: NotBigGhost Date: Wed, 9 Sep 2026 14:39:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D0=BA=D1=83=20=C2=AB=D0=B8=D0=B4=D1=91=D1=82=C2=BB?= =?UTF-8?q?=20=D0=B8=D0=B7=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B0=20=D0=BD=D0=B5?= =?UTF-8?q?=D0=B7=D0=B0=D0=B2=D0=B5=D1=80=D1=88=D1=91=D0=BD=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D0=BF=D0=B0=D1=80=D1=82=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Блок озаглавлен «Незавершённые партии», а каждая карточка заканчивается кнопкой «Завершить» — бейдж дублировал и то и другое; на странице группы, где название группы не показывается, он вдобавок висел в строке один. Заодно снято мёртвое ветвление в MatchListView: незавершённые партии туда не попадают ни из группы (там отдельный блок), ни из истории профиля (бэкенд фильтрует по status="finished"). На странице самой партии бейдж остаётся — там он единственный указатель статуса. #26 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_0186Fk74jkkszahEHSjBzTjD --- frontend/src/components/InProgressMatches.tsx | 5 +---- frontend/src/components/MatchList.tsx | 14 ++++++-------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/InProgressMatches.tsx b/frontend/src/components/InProgressMatches.tsx index bb1971f..5b2daa5 100644 --- a/frontend/src/components/InProgressMatches.tsx +++ b/frontend/src/components/InProgressMatches.tsx @@ -29,10 +29,7 @@ export function InProgressMatches({ style={{ margin: 0, width: "100%", textAlign: "left" }} >
-
- {showGroupName && {m.group_name}} - идёт -
+ {showGroupName && {m.group_name}}
{formatTime(m.started_at)} · {m.player_count}{" "} {plural(m.player_count, "игрок", "игрока", "игроков")} diff --git a/frontend/src/components/MatchList.tsx b/frontend/src/components/MatchList.tsx index 36d0555..014a31e 100644 --- a/frontend/src/components/MatchList.tsx +++ b/frontend/src/components/MatchList.tsx @@ -4,6 +4,9 @@ import { formatDate, formatDuration } from "../domain/format"; import { winReasonLabel } from "../domain/winReasons"; import type { MatchListItem } from "../domain/types"; +/** Список ЗАВЕРШЁННЫХ партий. Незавершённые сюда не попадают: группа отдаёт их + * отдельным блоком (InProgressMatches), а история профиля приходит с бэкенда уже + * отфильтрованной по status="finished". */ export function MatchListView({ items }: { items: MatchListItem[] }) { const navigate = useNavigate(); if (items.length === 0) return
Партий пока нет.
; @@ -11,7 +14,6 @@ export function MatchListView({ items }: { items: MatchListItem[] }) { return (
{items.map((m) => { - const inProgress = m.status === "in_progress"; const sorted = [...m.participants].sort((a, b) => (a.place ?? 99) - (b.place ?? 99)); return (