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

+9 -5
View File
@@ -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();
}