From 8ee9d8494984a6f562bd93c94530b8cc32c7862e Mon Sep 17 00:00:00 2001 From: Sucukdeluxe <259325684+Sucukdeluxe@users.noreply.github.com> Date: Thu, 15 Oct 2026 04:57:28 +0200 Subject: [PATCH] Show the current application version in the window title --- main.js | 2 +- renderer/app.js | 14 +++++++++----- renderer/index.html | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/main.js b/main.js index dee0002..e16ec62 100644 --- a/main.js +++ b/main.js @@ -1598,7 +1598,7 @@ async function settleWindowContentAfterShow(window) { function createWindow() { const startupWindow = createStartupWindow(BrowserWindow, { - title: 'Multi Hoster Uploader', + title: `Multi-Hoster-Uploader | v.${app.getVersion()}`, width: 1100, height: 750, minWidth: 800, diff --git a/renderer/app.js b/renderer/app.js index c4a3da1..17657b1 100644 --- a/renderer/app.js +++ b/renderer/app.js @@ -1537,8 +1537,7 @@ async function init() { // Version display try { const version = await window.api.getVersion(); - const versionLabel = document.getElementById('versionLabel'); - if (versionLabel) versionLabel.textContent = `v${version}`; + setApplicationVersion(version); } catch {} window.api.onUploadProgress((data) => { @@ -6187,10 +6186,15 @@ function initUploadSpeedSparkline() { window.addEventListener('beforeunload', () => window.clearInterval(uploadSpeedTimer), { once: true }); } -function initializeStaticHeader() { - const version = new URLSearchParams(window.location.search).get('version') || ''; +function setApplicationVersion(version) { + if (typeof version !== 'string' || version !== version.trim() || !/^\d+\.\d+\.\d+$/.test(version)) return; const versionLabel = document.getElementById('versionLabel'); - if (versionLabel && /^\d+\.\d+\.\d+$/.test(version)) versionLabel.textContent = `v${version}`; + if (versionLabel) versionLabel.textContent = `v${version}`; + document.title = `Multi-Hoster-Uploader | v.${version}`; +} + +function initializeStaticHeader() { + setApplicationVersion(new URLSearchParams(window.location.search).get('version')); initUploadSpeedSparkline(); _syncHeaderUpdateState(); } diff --git a/renderer/index.html b/renderer/index.html index 2002253..a681fc0 100644 --- a/renderer/index.html +++ b/renderer/index.html @@ -4,7 +4,7 @@ - Multi Hoster Uploader + Multi-Hoster-Uploader