Upload via GUI (22 Dateien)

This commit is contained in:
Git Manager GUI
2026-08-01 21:34:03 +02:00
parent a74efdfd8f
commit 56212fba73
4 changed files with 19 additions and 11 deletions
+12 -5
View File
@@ -727,13 +727,20 @@ function closeContextMenu() {
el('ctx-menu').classList.add('hidden');
}
function formatVersionLabel(version) {
return String(version || '')
.replace(/^v/i, '')
.replace(/-beta$/i, ' Beta')
.trim() || '';
}
// ---------- Automatische Updates ----------
let pendingUpdate = null;
function showUpdateDialog(info) {
pendingUpdate = info;
el('upd-current').textContent = 'v' + info.currentVersion;
el('upd-new').textContent = 'v' + info.latestVersion;
el('upd-current').textContent = formatVersionLabel(info.currentVersion);
el('upd-new').textContent = formatVersionLabel(info.latestVersion);
el('upd-notes').textContent = (info.notes || '').trim() || 'Keine Änderungshinweise hinterlegt.';
el('upd-progress').classList.add('hidden');
el('upd-bar-fill').style.width = '0%';
@@ -1706,7 +1713,7 @@ async function openSettings() {
const info = await window.api.appInfo();
el('s-appinfo').innerHTML = [
['Name', info.name || 'AeroMC'],
['Version', info.version || ''],
['Version', formatVersionLabel(info.version)],
['Autor', info.author || 'Nicht hinterlegt'],
['Webseite', info.homepage || 'Nicht hinterlegt', info.homepage || ''],
['Gitseite', info.gitpage || 'Nicht hinterlegt', info.gitpage || ''],
@@ -2169,11 +2176,11 @@ function wire() {
if (info.error) { st.textContent = '✖ ' + info.error; return; }
if (info.noReleases) { st.textContent = 'Noch keine Veröffentlichung vorhanden.'; return; }
if (info.available) {
st.textContent = `Version ${info.latestVersion} verfügbar.`;
st.textContent = `Version ${formatVersionLabel(info.latestVersion)} verfügbar.`;
hide('modal-settings');
showUpdateDialog(info);
} else {
st.textContent = `Du hast bereits die neueste Version (v${info.currentVersion}).`;
st.textContent = `Du hast bereits die neueste Version (${formatVersionLabel(info.currentVersion)}).`;
}
});
}