Add conf.yaml PWA config #168

Merged
jgeorgi merged 5 commits from xps-site-config into main 2024-03-31 04:00:35 +00:00
8 changed files with 174 additions and 54 deletions
Showing only changes of commit 1161fc193f - Show all commits

View File

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

View File

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