diff --git a/.vscode/launch.json b/.vscode/launch.json index 152c4f8a..58ad7c21 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,20 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Accweb Frontend", + "request": "launch", + "runtimeArgs": [ + "run", + "dev" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "type": "node", + "cwd": "${workspaceFolder}/public" + }, { "name": "Accweb Backend", "type": "go", diff --git a/CHANGELOG.md b/CHANGELOG.md index fcf5eed1..4e8a3cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.23.0 +* Feature: token timeout in configuration file [#262](https://github.com/assetto-corsa-web/accweb/issues/262) +* Fix setTyreSetCount default value to 50. [#227](https://github.com/assetto-corsa-web/accweb/issues/227) +* Fix LFM files encoding [#265](https://github.com/assetto-corsa-web/accweb/issues/265) [#266](https://github.com/assetto-corsa-web/accweb/issues/266) + ## 1.22.2 * bump some go libs * first test with wine killing processes issue diff --git a/internal/pkg/cfg/cfg.go b/internal/pkg/cfg/cfg.go index a317d0a1..3558b2ab 100644 --- a/internal/pkg/cfg/cfg.go +++ b/internal/pkg/cfg/cfg.go @@ -79,8 +79,8 @@ func Load(file string) *Config { } if config.Auth.Timeout == nil { - m5 := 5 * time.Minute - config.Auth.Timeout = &m5 + m := 20 * time.Minute + config.Auth.Timeout = &m } skipWine = config.SkipWine diff --git a/public/src/components/collapsible.vue b/public/src/components/collapsible.vue index 4c86cb18..a5f10678 100644 --- a/public/src/components/collapsible.vue +++ b/public/src/components/collapsible.vue @@ -9,6 +9,9 @@
+
+ This is an invalid JSON file or maybe there is encoding issues. +
@@ -22,13 +25,21 @@ export default { components: { filereader }, data() { return { - expanded: false + expanded: false, + loadError: '' }; }, methods: { onLoadContent: function (e) { - this.$emit("load", JSON.parse(e)); - this.expanded = true + this.expanded = true; + this.loadError = false; + try { + const obj = JSON.parse(e.replaceAll('\x00', '')); + this.$emit("load", obj); + + } catch (err) { + this.loadError = true; + } } } }