feat(webui): comprehensive UI modernization and server configuration enhancements

This commit is contained in:
Wha1eChai
2026-01-08 22:17:13 +08:00
parent a7aacdb0ae
commit dc9bea1100
3 changed files with 57 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
/**
* Antigravity Console - Main Entry
*
*
* This file orchestrates Alpine.js initialization.
* Components are loaded via separate script files that register themselves
* to window.Components before this script runs.
@@ -26,12 +26,14 @@ document.addEventListener('alpine:init', () => {
return;
}
fetch(`views/${viewName}.html`)
fetch(`views/${viewName}.html?t=${Date.now()}`)
.then(response => {
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return response.text();
})
.then(html => {
// Update cache (optional, or remove if we want always-fresh)
// keeping cache for session performance, but initial load will now bypass browser cache
window.viewCache.set(viewName, html);
el.innerHTML = html;
Alpine.initTree(el);