From b8c136878ba021ef30bbd922c6f93087163be891 Mon Sep 17 00:00:00 2001 From: Vladimir Zagainov Date: Sat, 6 Jun 2026 20:08:37 +0300 Subject: [PATCH] fix: pass os/arch to launcher latest endpoint and improve skin/cape loading --- internal/templates/html/profile.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 || '—');