feat: fix incorrect Casdoor version in system info page (#1631)

* feat: add sync module to bi-sync mysql

* feat: fix the delay problem

* feat: fix go mod

* feat: fix the varchar(100) parse error

* fix: fix go.mod space inconsistency

* fix: fix go.mod space inconsistency

* fix: use sql builder instead of concatenation

* fix: remove serverId

* fix: fix file is not `gofumpt`-ed (gofumpt) error

* feat: add mysql bi-sync

* feat: fix some data inconsistency problems

* feat: add function atuo get server uuid

* fix: encapsulate the struct to optimize the code

* fix: fix incorrect Casdoor version in system info page

* fix: fix incorrect root path

* Update sysytem_test.go

---------

Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
longxu0509
2023-03-09 13:28:23 +08:00
committed by GitHub
parent a5dfe54a33
commit 3f623570fd
6 changed files with 187 additions and 33 deletions

View File

@ -59,8 +59,8 @@ class SystemInfo extends React.Component {
});
SystemBackend.getGitHubLatestReleaseVersion().then(res => {
const href = res && res.length >= 8 ? `https://github.com/casdoor/casdoor/commit/${res}` : "";
const versionText = res && res.length >= 8 ? res.substring(0, 8) : i18next.t("system:Unknown Version");
const href = res.version && res.version.length > 0 ? `https://github.com/casdoor/casdoor/releases/tag/${res.version}` : "";
const versionText = res.version && res.version.length > 0 ? res.version : i18next.t("system:Unknown Version");
this.setState({latestVersion: versionText, href: href});
}).catch(err => {
Setting.showMessage("error", `get latest commit version failed: ${err}`);