updates modes

This commit is contained in:
2026-09-10 11:52:40 +07:00
parent 77e5a783cc
commit 3fe0083593
40 changed files with 59 additions and 44 deletions
+15
View File
@@ -14,6 +14,7 @@ import type {
Game,
MapItem,
Question,
ScreenMode,
ScreenState,
Team,
TeamAnswers,
@@ -208,6 +209,11 @@ async function unbindScreen(screen: ScreenState) {
await getGameScreens()
}
async function setScreenMode(mode: ScreenMode) {
const res = await client.SetScreenMode({ gameId: Number(gameId), mode })
if (res.error != '') message.error(res.error || 'Не удалось изменить режим экранов')
}
async function toTeamStory(id: number, password: string, newTab: boolean = false) {
const uri = '/team-story/' + id + '?password=' + password
if (newTab) {
@@ -612,6 +618,11 @@ useSimplePolling(() => {
<n-button size="small" type="error" ghost @click="unbindScreen(screen)">Отвязать</n-button>
</n-flex>
</div>
<n-space class="screen-mode-controls">
<n-button size="small" @click="setScreenMode('SCREEN_MODE_COVER')">Обложка</n-button>
<n-button size="small" @click="setScreenMode('SCREEN_MODE_INTRO_DONE')">Успехов</n-button>
<n-button size="small" @click="setScreenMode('SCREEN_MODE_CONCLUSION_DONE')">Спасибо за игру!</n-button>
</n-space>
</div>
<div class="map-block">
@@ -1023,6 +1034,10 @@ useSimplePolling(() => {
font-size: 13px;
}
.screen-mode-controls {
margin-top: 12px;
}
.map-block {
background-color: #222;
border-radius: 10px;