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(() => {
>
Показать
+
+
+
+ Старт
+
+
+ Пауза
+
+
+ Продолжить
+
+
+ Сбросить
+
+
+
+
+ Запуск
+
+
+ Пауза
+
+
+ Продолжить
+
+
+ Стоп
+
+
+ Повтор
+
+
+
+ Громкость
+
+
+
+ Перемотать
+
+
+
Добавить шаг