fix: dynamic site name from DB, displayed in header/title/sidebar

This commit is contained in:
2026-07-16 04:02:19 +08:00
parent abf747e3af
commit f423e1f791
3 changed files with 22 additions and 5 deletions

View File

@@ -15,6 +15,10 @@ const App = {
],
async init() {
if (window.__SITE_NAME__) {
document.getElementById('site-title').textContent = window.__SITE_NAME__;
document.getElementById('sidebar-title').textContent = window.__SITE_NAME__ || '举报系统';
}
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());