Refactor GUI rendering and align RTA axis

This commit is contained in:
Mikei386
2026-07-22 11:35:51 +02:00
parent 2e868bfa3a
commit 890a47a272
16 changed files with 1199 additions and 1415 deletions
+30
View File
@@ -0,0 +1,30 @@
let loadPromise = null;
export function setupLazyChangelog(details, content) {
if (!details || !content || details.dataset.bound === '1') return;
details.dataset.bound = '1';
const load = async () => {
if (content.dataset.loaded === '1') return;
if (!loadPromise) {
loadPromise = fetch('./changelog.html', { cache: 'no-cache' })
.then((response) => {
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return response.text();
});
}
try {
content.innerHTML = await loadPromise;
content.dataset.loaded = '1';
} catch (error) {
loadPromise = null;
content.textContent = 'Versionsverlauf konnte nicht geladen werden.';
console.warn('Changelog load error:', error);
}
};
details.addEventListener('toggle', () => {
if (details.open) void load();
});
if (details.open) void load();
}