Themes: Fixes system theme asset paths (#80019)

This commit is contained in:
Torkel Ödegaard 2024-01-04 14:33:19 +01:00 committed by GitHub
parent 89a3337afa
commit a349ef6c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -243,7 +243,7 @@
user: [[.User]],
settings: [[.Settings]],
navTree: [[.NavTree]],
assets: [[.Assets]]
assets: [[.Assets]]
};
// Set theme to match system only on startup.
@ -256,11 +256,11 @@
if (darkQuery.matches) {
document.body.classList.add("theme-dark");
cssLink.href = window.grafanaBootData.themePaths.dark;
cssLink.href = window.grafanaBootData.assets.dark;
window.grafanaBootData.user.lightTheme = false;
} else {
document.body.classList.add("theme-light");
cssLink.href = window.grafanaBootData.themePaths.light;
cssLink.href = window.grafanaBootData.assets.light;
window.grafanaBootData.user.lightTheme = true;
}
document.head.appendChild(cssLink);