From 54a8f61456f94267a6b00d3392ae41e5f40f403b Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Sun, 4 Oct 2026 04:08:17 +0700 Subject: [PATCH] up --- proto/main.proto | 1 + .../crabs/evening_detective_server/index.ts | 1 + src/components/GamePage.vue | 15 +++++++++++++++ src/components/ScenariosEditorPage.vue | 1 + 4 files changed, 18 insertions(+) diff --git a/proto/main.proto b/proto/main.proto index 4ca90f0..4ccb105 100644 --- a/proto/main.proto +++ b/proto/main.proto @@ -1777,6 +1777,7 @@ message AddTeamReq { int32 gameID = 1; string name = 2; string captain_email = 3; + int32 participants_count = 4; } message AddTeamRsp { diff --git a/src/api/generated/crabs/evening_detective_server/index.ts b/src/api/generated/crabs/evening_detective_server/index.ts index b4b0b0b..3efdfce 100644 --- a/src/api/generated/crabs/evening_detective_server/index.ts +++ b/src/api/generated/crabs/evening_detective_server/index.ts @@ -808,6 +808,7 @@ export type AddTeamReq = { gameID: number | undefined; name: string | undefined; captainEmail: string | undefined; + participantsCount: number | undefined; }; export type AddTeamRsp = { diff --git a/src/components/GamePage.vue b/src/components/GamePage.vue index eaf0723..2925d4f 100644 --- a/src/components/GamePage.vue +++ b/src/components/GamePage.vue @@ -59,6 +59,7 @@ const showDeleteTeamModal = ref(false) const showDeleteGameModal = ref(false) const newTeamName = ref('') const newTeamEmail = ref('') +const newTeamParticipants = ref(1) const deletedGameName = ref('') const showQR = ref(false) const urlQR = ref('') @@ -432,14 +433,20 @@ function giveApplication(team: Team, application: Application) { } async function addTeam() { + if (newTeamParticipants.value < 1 || newTeamParticipants.value > 8) { + message.error('Укажите от 1 до 8 игроков') + return + } await client.AddTeam({ gameID: game.value.ID, name: newTeamName.value, captainEmail: newTeamEmail.value.trim(), + participantsCount: newTeamParticipants.value, }) await getGame(game.value.ID!) showAddTeamModal.value = false newTeamEmail.value = '' + newTeamParticipants.value = 1 } async function confirmGiveApplication() { @@ -1135,6 +1142,14 @@ useSimplePolling(() => { placeholder="Почта капитана (необязательно)" aria-label="Почта капитана (необязательно)" /> +