Add version information and links to the github repo and discord server at the bottom of the settings menu

dev
peshomir 2025-03-22 12:46:20 +02:00
parent 78e20d745e
commit 07f359c3d8
2 changed files with 15 additions and 1 deletions

View File

@ -1,6 +1,8 @@
import { KeybindsInput } from "./keybindsInput.js";
import winCounter from "./winCounter.js";
import WindowManager from "./windowManager.js";
import versionData from '../version.json';
import { displayChangelog } from './changelog.js';
window.__fx = window.__fx || {};
const __fx = window.__fx;
@ -106,6 +108,17 @@ const settingsManager = new (function () {
{
for: "keybindButtons", type: "checkbox",
label: "Keybind buttons", note: "Show keybind buttons above the troop selector (max 6)"
},
function Footer(container) {
const versionInfo = document.createElement("p");
versionInfo.innerText = `FX Client v${versionData.version}`;
const links = document.createElement("p");
links.innerHTML = `<a href="https://discord.gg/mtWFTQhTT9" target="_blank">Discord server</a> |
<a href="https://github.com/fxclient/FXclient#readme">Github repository</a>`;
const changelogButton = document.createElement("button");
changelogButton.innerText = "Changelog";
changelogButton.addEventListener("click", displayChangelog);
container.append(versionInfo, links, changelogButton);
}
];
const settingsContainer = document.querySelector(".settings .scrollable");
@ -232,7 +245,7 @@ const settingsManager = new (function () {
Object.keys(checkboxFields).forEach(function (key) {
checkboxFields[key].checked = settings[key];
});
customElements.forEach((element) => element.update(settings));
customElements.forEach((element) => element.update?.(settings));
};
this.resetAll = function () {
if (

View File

@ -3,6 +3,7 @@
"lastUpdated": "Mar 22",
"changes": [
"Added a \"What's new\" screen (the one you're looking at right now!) which displays a changelog of the latest version",
"Added version information at the bottom of the setting page along with a link to the FX Client Discord server and GitHub repository. Previously this was shown only in the vanilla version menu.",
"The custom lobby server no longer tries to verify the compatibility of the client version"
]
}