fix: loadFooter only for admin, only once per session
This commit is contained in:
@@ -13,11 +13,14 @@ const App = {
|
|||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
try { const s = await API.get('/install/status'); if (!s.installed) { location.hash = '#/install'; return; } } catch { location.hash = '#/install'; return; }
|
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());
|
window.addEventListener('hashchange', () => this.route());
|
||||||
this.route();
|
this.route();
|
||||||
},
|
},
|
||||||
|
|
||||||
async loadFooter() {
|
async loadFooter() {
|
||||||
|
if (!Auth.isAdmin() || this._footerLoaded) return;
|
||||||
|
this._footerLoaded = true;
|
||||||
try {
|
try {
|
||||||
const s = await API.get('/settings/settings');
|
const s = await API.get('/settings/settings');
|
||||||
const cr = document.getElementById('footer-copyright');
|
const cr = document.getElementById('footer-copyright');
|
||||||
|
|||||||
Reference in New Issue
Block a user