Fix dashboard perf section not localizing on language change
The persistent perf section was created once and never rebuilt, so switching language left stale text. Now updateAllText() removes the persistent element and reloads the dashboard to recreate it with the new locale. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -105,5 +105,9 @@ export function updateAllText() {
|
|||||||
import('../core/api.js').then(({ loadDisplays }) => loadDisplays());
|
import('../core/api.js').then(({ loadDisplays }) => loadDisplays());
|
||||||
if (typeof window.loadTargetsTab === 'function') window.loadTargetsTab();
|
if (typeof window.loadTargetsTab === 'function') window.loadTargetsTab();
|
||||||
if (typeof window.loadPictureSources === 'function') window.loadPictureSources();
|
if (typeof window.loadPictureSources === 'function') window.loadPictureSources();
|
||||||
|
// Force perf section rebuild with new locale
|
||||||
|
const perfEl = document.querySelector('.dashboard-perf-persistent');
|
||||||
|
if (perfEl) perfEl.remove();
|
||||||
|
if (typeof window.loadDashboard === 'function') window.loadDashboard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user