diff --git a/internal/templates/html/profile.html b/internal/templates/html/profile.html index 973987e..fc23fbd 100644 --- a/internal/templates/html/profile.html +++ b/internal/templates/html/profile.html @@ -126,7 +126,12 @@ async function loadLauncherInfo() { try { - const res = await fetch('/api/launcher/latest'); + const os = navigator.userAgent.includes('Mac') ? 'darwin' : + navigator.userAgent.includes('Win') ? 'windows' : 'linux'; + const arch = navigator.userAgent.includes('x86_64') || navigator.userAgent.includes('WOW64') ? 'amd64' : + navigator.userAgent.includes('arm64') || navigator.userAgent.includes('aarch64') ? 'arm64' : 'amd64'; + + const res = await fetch('/api/launcher/latest?os=' + os + '&arch=' + arch); if (!res.ok) return; const data = await res.json(); document.getElementById('latestVersion').textContent = 'Последняя версия: ' + (data.version || '—');