diff --git a/html/index.html b/html/index.html
index 60f0adc..3557f5c 100644
--- a/html/index.html
+++ b/html/index.html
@@ -22,7 +22,7 @@
- Neue Version verfügbar! Klicken Sie
hier, um sie herunterzuladen.
+ New Version available! Click
here to download.
diff --git a/src/webserver.go b/src/webserver.go
index 9d57627..4112062 100644
--- a/src/webserver.go
+++ b/src/webserver.go
@@ -1188,7 +1188,7 @@ func setDefaultResponseData(response ResponseStruct, data bool) (defaults Respon
switch System.Branch {
case "master":
- defaults.ClientInfo.Version =System.Version
+ defaults.ClientInfo.Version = System.Version
default:
defaults.ClientInfo.Version = fmt.Sprintf("%s (%s)", System.Version, System.Build)
diff --git a/threadfin.go b/threadfin.go
index 3ea0e2a..a5f2d50 100644
--- a/threadfin.go
+++ b/threadfin.go
@@ -42,13 +42,13 @@ var GitHub = GitHubStruct{Branch: "Main", User: "marcelGoerentz", Repo: "Threadf
const Name = "Threadfin"
// Version : Version, die Build Nummer wird in der main func geparst.
-const Version = "1.2.4"
+const Version = "1.2.5"
// DBVersion : Datanbank Version
const DBVersion = "0.5.0"
// APIVersion : API Version
-const APIVersion = "1.2.4"
+const APIVersion = "1.2.5"
var homeDirectory = fmt.Sprintf("%s%s.%s%s", src.GetUserHomeDirectory(), string(os.PathSeparator), strings.ToLower(Name), string(os.PathSeparator))
var samplePath = fmt.Sprintf("%spath%sto%sthreadfin%s", string(os.PathSeparator), string(os.PathSeparator), string(os.PathSeparator), string(os.PathSeparator))
diff --git a/ts/banner.ts b/ts/banner.ts
index 4af6320..b1df97c 100644
--- a/ts/banner.ts
+++ b/ts/banner.ts
@@ -9,15 +9,28 @@ async function getNewestReleaseFromGithub() {
}));
// Get tag name
var release_tag = releases[0]["tag_name"];
- const regex = /[^\d]/gi;
- // Create Number from tag name
- const latest_version = Number(release_tag.replace(regex, ''));
- const version_elemnt = document.getElementById('version') as HTMLInputElement;
- const current_version = Number(version_elemnt.value.replace(regex, ''));
- if (latest_version > current_version) {
- bannerElement.style.display = 'block'; // Show Banner if newer version is available
+ const split = release_tag.split(".");
+ const release_major_version = split[0][1]
+ const release_minor_version = split[1]
+ const release_build_version = split[2]
+ const release_version = [release_major_version, release_minor_version, release_build_version]
+ let current_version = []
+
+ if (SERVER) {
+ var current_version_string = SERVER["clientInfo"]["version"];
+ current_version.push(current_version_string.split(".")[0]);
+ current_version.push(current_version_string.split(".")[1][0]);
+ current_version.push(current_version_string.split("(")[1][0]);
+ }
+ for (let i = 0; i < 3; i++) {
+ if (release_version[i] > current_version[i]) {
+ bannerElement.innerHTML = 'New Version available! Click
here to download.';
+ bannerElement.style.display = 'block'; // Show Banner if newer version is available
+ break
+ } else if (release_version[i] < current_version[i]) {
+ break
+ }
}
-
} else {
console.log('Error fetching releases or no releases found.');
}