Disable conf.yaml for cordova builds

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
2024-03-30 20:59:09 -07:00
parent ec818701d6
commit 1161fc193f
2 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ regions:
- thorax - thorax
- abdomen - abdomen
- limbs - limbs
#useExternal: required useExternal: required
external: external:
- name: Mserver - name: Mserver
address: "192.169.1.105" address: "192.169.1.105"

View File

@@ -74,9 +74,11 @@
} }
}, },
async created () { async created () {
const confText = await fetch(`${!!window.cordova ? 'https://localhost' : '.'}/conf/conf.yaml`) if (!window.cordova) {
.then((mod) => { return mod.text() }) const confText = await fetch('./conf/conf.yaml')
this.siteConf = YAML.parse(confText) .then((mod) => { return mod.text() })
this.siteConf = YAML.parse(confText)
}
const loadSiteSettings = localStorage.getItem('siteSettings') const loadSiteSettings = localStorage.getItem('siteSettings')
if (loadSiteSettings) { if (loadSiteSettings) {
let loadedSettings = JSON.parse(loadSiteSettings) let loadedSettings = JSON.parse(loadSiteSettings)