fix: loadFooter only for admin, only once per session

This commit is contained in:
2026-07-12 04:21:26 +08:00
parent 5dd0db76be
commit 82c2671149

View File

@@ -13,11 +13,14 @@ const App = {
async init() {
try { const s = await API.get('/install/status'); if (!s.installed) { location.hash = '#/install'; return; } } catch { location.hash = '#/install'; return; }
this._footerLoaded = false;
window.addEventListener('hashchange', () => this.route());
this.route();
},
async loadFooter() {
if (!Auth.isAdmin() || this._footerLoaded) return;
this._footerLoaded = true;
try {
const s = await API.get('/settings/settings');
const cr = document.getElementById('footer-copyright');