@@ -3,6 +3,7 @@ import { onBeforeMount, ref, nextTick, onMounted, onUnmounted } from 'vue'
33import { QrcodeStream } from ' vue-qrcode-reader'
44import StandardButton from ' @/components/Common/StandardButton.vue'
55import { useCameraStore } from ' @/stores/camera'
6+ import { useEventyayApi } from ' @/stores/eventyayapi'
67import RefreshButton from ' @/components/Utilities/RefreshButton.vue'
78import { ArrowsRightLeftIcon , VideoCameraIcon } from ' @heroicons/vue/20/solid'
89
@@ -13,8 +14,11 @@ const destroyed = ref(false)
1314const isCameraOn = ref (false )
1415let inactivityTimer = null
1516
17+ const processApi = useEventyayApi ()
18+ const { selectedRole } = processApi
19+
1620onMounted (() => {
17- startInactivityTimer ()
21+ if (selectedRole != " Badge Station " ) { startInactivityTimer ()}
1822})
1923
2024onUnmounted (() => {
@@ -106,10 +110,12 @@ function toggleCamera() {
106110
107111function startInactivityTimer () {
108112 clearInactivityTimer ()
109- inactivityTimer = setTimeout (() => {
110- isCameraOn .value = false
111- cameraStore .paused = true
112- }, 25000 ) // 25 seconds
113+ if (selectedRole!= " Badge Station" ) {
114+ inactivityTimer = setTimeout (() => {
115+ isCameraOn .value = false
116+ cameraStore .paused = true
117+ }, 25000 ) // 25 seconds
118+ }
113119}
114120
115121function clearInactivityTimer () {
0 commit comments