@mixd-id/web-scaffold 0.1.240411040 → 0.1.240411042

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.240411040",
4
+ "version": "0.1.240411042",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -174,7 +174,7 @@ export default{
174
174
 
175
175
  this.isLoading = true
176
176
  axios({
177
- url: import.meta.env.VITE_API_HOST + this.urlAnalyse,
177
+ url: this.urlAnalyse,
178
178
  method: 'POST',
179
179
  data
180
180
  })
@@ -224,7 +224,7 @@ export default{
224
224
 
225
225
  this.isLoading = true
226
226
  axios({
227
- url: import.meta.env.VITE_API_HOST + this.urlImport,
227
+ url: this.urlImport,
228
228
  method: 'POST',
229
229
  data: this.importData
230
230
  })
@@ -423,15 +423,19 @@ export default{
423
423
  async loadPreset(){
424
424
  if(!Object.keys(this.$route.query).map(_ => _.toLowerCase()).includes('reset')){
425
425
  if(this.presetKey){
426
- return this.socket.send(this.presetSrc, { key:this.presetKey })
427
- .then(config => {
428
- if(config){
429
- Object.assign(this.cConfig, config)
426
+ const config = await this.socket.send(this.presetSrc, { key:this.presetKey })
427
+ if(config){
428
+ if((config.presets ?? []).length > 0){
429
+ Object.assign(this.cConfig, config)
430
+ }
431
+ else{
432
+ const defaultConfig = setupConfig(await this.defaultConfig())
433
+ Object.assign(this.cConfig, defaultConfig)
434
+ }
430
435
 
431
- if(this.$route.query?.search)
432
- this.preset.search = this.$route.query.search
433
- }
434
- })
436
+ if(this.$route.query?.search)
437
+ this.preset.search = this.$route.query.search
438
+ }
435
439
  }
436
440
  else{
437
441
  const defaultConfig = setupConfig(await this.defaultConfig())