This commit is contained in:
2026-10-11 03:05:44 +07:00
parent 053f9bac68
commit a01fd5c452
3 changed files with 64 additions and 23 deletions
+16 -11
View File
@@ -126,17 +126,22 @@ async function getStory() {
getStory()
getAnswers()
async function addAction(newCode: string) {
await client.AddTeamAction({
ID: Number(teamId),
password: password as string,
code: newCode,
})
await getStory()
code.value = ''
await nextTick()
newPlacesCount.value = 0
async function addAction(newCode: string): Promise<boolean> {
try {
await client.AddTeamAction({
ID: Number(teamId),
password: password as string,
code: newCode,
})
await getStory()
code.value = ''
await nextTick()
newPlacesCount.value = 0
return true
} catch (err) {
message.error(err instanceof Error ? err.message : 'Не удалось сделать ход')
return false
}
}
type AdvancedStory = {