-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: janusweb
action: commit
revision:
path_from:
revision_from: f3fb5a125e913087fb9fcbc3af19cc7716a3b3c5:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit f3fb5a125e913087fb9fcbc3af19cc7716a3b3c5
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Sat May 1 23:25:23 2021 -0700

    Disable AR button if no devices found

diff --git a/media/assets/webui/apps/buttons/buttons.js b/media/assets/webui/apps/buttons/buttons.js

index 9b6f28778082d03e133b1f29f025d66cad8925b7..

index ..c0bada21fe108a04ce0a37a84b2e6997ed0fd38f 100644

--- a/media/assets/webui/apps/buttons/buttons.js
+++ b/media/assets/webui/apps/buttons/buttons.js
@@ -143,12 +143,20 @@ elation.elements.define('janus-button-webar', class extends elation.elements.ui.
     super.create();
     this.view = janus.engine.client.view;

+    this.disabled = true;
     if ('xr' in navigator) {
       this.label = this.inactivelabel;
       this.xr = true;
       navigator.xr.isSessionSupported('immersive-ar').then(supported => {
         this.enabled = supported;
+        if (supported) {
+          this.disabled = false;
+        } else {
+          this.title = 'WebXR supported, but no AR devices found';
+        }
       });
+    } else {
+      this.title = 'WebXR is not supported in this browser';
     }
   }
   onactivate(ev) {

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 18:20:59 2024