From 839d83433eaacdc35984201b18979359499dbe68 Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Sun, 4 Oct 2026 13:32:22 +0700 Subject: [PATCH] up --- dist/index.html | 8 ++--- src/components/GamePage.vue | 64 +++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/dist/index.html b/dist/index.html index 5cad6e8..cdad031 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,10 +5,10 @@ Вечерний детектив - - - - + + + + diff --git a/src/components/GamePage.vue b/src/components/GamePage.vue index 8103cdc..ae02ebc 100644 --- a/src/components/GamePage.vue +++ b/src/components/GamePage.vue @@ -215,6 +215,7 @@ getGameScreens() async function getScreenPlan() { if (screenPlanDirty.value) return const res = await client.GetScreenPlan({ gameID: Number(gameId) }) + if (screenPlanDirty.value) return screenPlan.value = res.plan screenPlanDraft.value = res.plan?.steps?.map((step) => ({ ...step })) || [] } @@ -283,6 +284,26 @@ async function setScreenPlanStep(index: number) { } } +async function sendScreenPlanCommand(mode: ScreenMode | undefined, command: ScreenCommand) { + if ( + screenPlanDirty.value || + (mode !== 'SCREEN_MODE_TIMER' && mode !== 'SCREEN_MODE_INTRO' && mode !== 'SCREEN_MODE_CONCLUSION') + ) { + return + } + try { + await client.SendScreenCommand({ + gameID: Number(gameId), + command, + positionMs: Math.max(0, Math.round(screenPosition.value * 1000)), + volume: Math.max(0, Math.min(100, Math.round(screenVolume.value))), + }) + await getGameScreens() + } catch (err) { + message.error(err instanceof Error ? err.message : 'Не удалось управлять экраном') + } +} + function stopScreenScanner() { cancelAnimationFrame(screenScannerFrame) screenScannerStream?.getTracks().forEach((track) => track.stop()) @@ -952,6 +973,7 @@ useSimplePolling(() => { +

План экранов

@@ -1111,6 +1134,47 @@ useSimplePolling(() => { > Показать + Добавить шаг