Add debug option to detect panel for app issue (#27)

Hoping this will help figure out why doods calls don't work when android app is compiled.

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>

Reviewed-on: Georgi_Lab/ALVINN_f7#27
This commit is contained in:
2023-12-01 21:23:44 -07:00
parent d104ba82c5
commit 5e6f118a13

View File

@@ -45,7 +45,11 @@
</f7-list> </f7-list>
</f7-accordion-content> </f7-accordion-content>
</f7-list-item> </f7-list-item>
<f7-list-item title="Turn on debugging">
<f7-toggle v-model:checked="debugOn" style="margin-right: 16px;" />
</f7-list-item>
</f7-list> </f7-list>
<f7-block v-if="debugOn" v-html="debugText" />
</f7-page> </f7-page>
</f7-panel> </f7-panel>
</f7-page> </f7-page>
@@ -185,7 +189,9 @@
level: 50, level: 50,
filter: [] filter: []
}, },
serverSettings: {} serverSettings: {},
debugOn: true,
debugText: ''
} }
}, },
created () { created () {
@@ -219,6 +225,7 @@
xhr.open("GET", modelURL) xhr.open("GET", modelURL)
xhr.setRequestHeader('Content-Type', 'application/json') xhr.setRequestHeader('Content-Type', 'application/json')
xhr.onload = function () { xhr.onload = function () {
if (self.debugOn) self.debugText = this.response //DEBUG ANDROID BUILD
if (this.status !== 200) { if (this.status !== 200) {
//this.response.text().then(function(message){alert(message)}) //this.response.text().then(function(message){alert(message)})
console.log(this.response) console.log(this.response)
@@ -248,6 +255,7 @@
xhr.open("POST", modelURL) xhr.open("POST", modelURL)
xhr.setRequestHeader('Content-Type', 'application/json') xhr.setRequestHeader('Content-Type', 'application/json')
xhr.onload = function () { xhr.onload = function () {
if (self.debugOn) self.debugText = this.response //DEBUG ANDROID BUILD
if (this.status !== 200) { if (this.status !== 200) {
//this.response.text().then(function(message){alert(message)}) //this.response.text().then(function(message){alert(message)})
console.log(this.response) console.log(this.response)