fix: dynamic site name from DB, displayed in header/title/sidebar
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user