From bc74bce68e87463ee707860f3c59cdee9a391497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 4 Aug 2026 11:56:33 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=20Add=20keep=20alive=20in=20presentat?= =?UTF-8?q?ion=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/modals/SetlistPresent.vue | 9 ++++++++- frontend/src/modals/SongPresent.vue | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/src/modals/SetlistPresent.vue b/frontend/src/modals/SetlistPresent.vue index 0f79e80..6d5093c 100644 --- a/frontend/src/modals/SetlistPresent.vue +++ b/frontend/src/modals/SetlistPresent.vue @@ -210,7 +210,7 @@ import { injectStrict, hkBackKey, hkCancelKey, hkDownKey, hkForwardKey, hkHideKe import 'vue3-carousel/dist/carousel.css'; import { Carousel, Slide, type CarouselExposed } from 'vue3-carousel'; import { logicOr } from '@vueuse/math'; -import { whenever } from '@vueuse/core'; +import { useWakeLock, whenever } from '@vueuse/core'; import { ref, computed, watch, onMounted, onUnmounted, nextTick, type PropType } from 'vue'; import { useI18n } from 'vue-i18n'; import type { SetlistSongPresentation } from '@/definitions'; @@ -363,6 +363,13 @@ watch (() => props.remoteHide, (val: boolean) => { } }); +// keep the screen awake while presenting +const { request: requestWakeLock, release: releaseWakeLock } = useWakeLock(); +watch(() => props.active, (isActive) => { + if (isActive) requestWakeLock('screen'); + else releaseWakeLock(); +}, { immediate: true }); + // handle mount / unmount hooks onMounted(() => { // alternate colon visibility of clock each second diff --git a/frontend/src/modals/SongPresent.vue b/frontend/src/modals/SongPresent.vue index 58b0a62..77e6105 100644 --- a/frontend/src/modals/SongPresent.vue +++ b/frontend/src/modals/SongPresent.vue @@ -47,7 +47,7 @@