cache busting: Import version, changelog (#1201)

## Description:

Import version, changelog statically using webpack for cache busting
purposes.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
This commit is contained in:
Scott Anderson
2025-06-17 00:25:18 -04:00
committed by GitHub
co-authored by Scott Anderson
parent ec4ef01d99
commit b9a379e21c
5 changed files with 30 additions and 6 deletions
+2 -6
View File
@@ -1,4 +1,5 @@
import favicon from "../../resources/images/Favicon.svg";
import version from "../../resources/version.txt";
import { GameRecord, GameStartInfo, ID } from "../core/Schemas";
import { getServerConfigFromClient } from "../core/configuration/ConfigLoader";
import { GameType } from "../core/game/Game";
@@ -64,9 +65,7 @@ class Client {
if (!gameVersion) {
console.warn("Game version element not found");
}
fetch("/version.txt")
.then((response) => (response.ok ? response.text() : "Failed to load"))
.then((version) => (gameVersion.innerText = version));
gameVersion.innerText = version;
const newsModal = document.querySelector("news-modal") as NewsModal;
if (!newsModal) {
@@ -79,9 +78,6 @@ class Client {
} else {
console.log("News button element found");
}
fetch("/changelog.md")
.then((response) => (response.ok ? response.text() : "Failed to load"))
.then((changelog) => (newsModal.markdown = changelog));
// Comment out to show news button.
// newsButton.hidden = true;