From 82c2671149569c0cb43ad0c5761fea970ca478b4 Mon Sep 17 00:00:00 2001 From: canglan Date: Sun, 12 Jul 2026 04:21:26 +0800 Subject: [PATCH] fix: loadFooter only for admin, only once per session --- public/js/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/js/app.js b/public/js/app.js index af10589..299bbe0 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -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');