Display launcher version in UI

Adds a version display element to the bottom right of the UI, fetching the version from package.json via a new IPC handler. Updates main.js, preload.js, and ui.js to support retrieving and displaying the version, and adds relevant styles in style.css.
This commit is contained in:
AMIAY
2026-01-22 08:07:32 +01:00
parent b61c94d348
commit 75f9403888
5 changed files with 86 additions and 0 deletions

View File

@@ -199,7 +199,9 @@ function createWindow() {
}
app.whenReady().then(async () => {
const packageJson = require('./package.json');
console.log('=== HYTALE F2P LAUNCHER STARTED ===');
console.log('Launcher version:', packageJson.version);
console.log('Platform:', process.platform);
console.log('Architecture:', process.arch);
console.log('Electron version:', process.versions.electron);
@@ -865,6 +867,11 @@ ipcMain.handle('window-maximize', () => {
}
});
ipcMain.handle('get-version', () => {
const packageJson = require('./package.json');
return packageJson.version;
});
ipcMain.handle('get-log-directory', () => {
return logger.getLogDirectory();
});