1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge branch 'feature' into 9856-strawberry-2

This commit is contained in:
Arthur
2024-03-22 07:29:45 -07:00
167 changed files with 2282 additions and 2399 deletions

View File

@@ -5,10 +5,11 @@
* @param inferred {boolean} Value is inferred from browser/system preference.
*/
function setMode(mode, inferred) {
document.documentElement.setAttribute("data-netbox-color-mode", mode);
document.documentElement.setAttribute("data-bs-theme", mode);
localStorage.setItem("netbox-color-mode", mode);
localStorage.setItem("netbox-color-mode-inferred", inferred);
}
/**
* Determine the best initial color mode to use prior to rendering.
*/
@@ -69,4 +70,4 @@ function initMode() {
console.error(error);
}
return setMode("light", true);
};
}