Show the current application version in the window title
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-15 04:57:28 +02:00
1 parent 0234ca226f
commit 8ee9d84949
3 files changed
+11 -7

No files matched your search

+1 -1
View File
@@ -1598,7 +1598,7 @@ async function settleWindowContentAfterShow(window) {
function createWindow() { function createWindow() {
const startupWindow = createStartupWindow(BrowserWindow, { const startupWindow = createStartupWindow(BrowserWindow, {
title: 'Multi Hoster Uploader', title: `Multi-Hoster-Uploader | v.${app.getVersion()}`,
width: 1100, width: 1100,
height: 750, height: 750,
minWidth: 800, minWidth: 800,
+9 -5
View File
@@ -1537,8 +1537,7 @@ async function init() {
// Version display // Version display
try { try {
const version = await window.api.getVersion(); const version = await window.api.getVersion();
const versionLabel = document.getElementById('versionLabel'); setApplicationVersion(version);
if (versionLabel) versionLabel.textContent = `v${version}`;
} catch {} } catch {}
window.api.onUploadProgress((data) => { window.api.onUploadProgress((data) => {
@@ -6187,10 +6186,15 @@ function initUploadSpeedSparkline() {
window.addEventListener('beforeunload', () => window.clearInterval(uploadSpeedTimer), { once: true }); window.addEventListener('beforeunload', () => window.clearInterval(uploadSpeedTimer), { once: true });
} }
function initializeStaticHeader() { function setApplicationVersion(version) {
const version = new URLSearchParams(window.location.search).get('version') || ''; if (typeof version !== 'string' || version !== version.trim() || !/^\d+\.\d+\.\d+$/.test(version)) return;
const versionLabel = document.getElementById('versionLabel'); 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(); initUploadSpeedSparkline();
_syncHeaderUpdateState(); _syncHeaderUpdateState();
} }
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline';"> <meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline';">
<meta name="theme-color" content="#0f0f0f"> <meta name="theme-color" content="#0f0f0f">
<title>Multi Hoster Uploader</title> <title>Multi-Hoster-Uploader</title>
<link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="styles.css">
</head> </head>
<body> <body>