Update FPS chart colors dynamically when accent color changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -814,6 +814,18 @@ document.addEventListener('languageChanged', () => {
|
||||
loadDashboard();
|
||||
});
|
||||
|
||||
// Update FPS chart colors when accent color changes
|
||||
document.addEventListener('accentColorChanged', () => {
|
||||
const accent = _getAccentColor();
|
||||
for (const chart of Object.values(_fpsCharts)) {
|
||||
if (!chart) continue;
|
||||
chart.data.datasets[0].borderColor = accent;
|
||||
chart.data.datasets[0].backgroundColor = accent + '1f';
|
||||
chart.data.datasets[1].borderColor = accent + '80';
|
||||
chart.update();
|
||||
}
|
||||
});
|
||||
|
||||
// Pause uptime timer when browser tab is hidden, resume when visible
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.hidden) {
|
||||
|
||||
Reference in New Issue
Block a user