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:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user