From a3f63749b1f47b684fd4b8a39cdc5bcbd0974b93 Mon Sep 17 00:00:00 2001 From: Justin Georgi Date: Tue, 26 Mar 2024 08:33:56 -0700 Subject: [PATCH] Add fullscreen setting to detect pages (#149) Closes: #147 Signed-off-by: Justin Georgi Reviewed-on: https://gitea.azgeorgis.net/ALVINN/ALVINN_f7/pulls/149 --- src/pages/detect.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pages/detect.vue b/src/pages/detect.vue index 3a9468e..ea64164 100644 --- a/src/pages/detect.vue +++ b/src/pages/detect.vue @@ -4,6 +4,7 @@ {{ regions[activeRegion] }} + @@ -119,6 +120,7 @@ import submitMixin from './submit-mixin' import detectionMixin from './detection-mixin' import cameraMixin from './camera-mixin' +import App from 'framework7-vue/components/app' export default { mixins: [submitMixin, detectionMixin, cameraMixin], @@ -148,6 +150,7 @@ serverSettings: {}, otherSettings: {}, isCordova: !!window.cordova, + isFullscreen: false, uploadUid: null, uploadDirty: false, modelLocation: '', @@ -465,6 +468,17 @@ } }) return cvsCoords + }, + toggleFullscreen() { + if (document.fullscreenElement) { + document.exitFullscreen().then( () => { + this.isFullscreen = false + }) + } else { + app.requestFullscreen().then( () => { + this.isFullscreen = true + }) + } } } }