MCPcopy Index your code
hub / github.com/microsoft/SandDance / initializeThemeInCustomizations

Function initializeThemeInCustomizations

docs/app/js/sanddance-app.js:26930–26944  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26928var _onThemeChangeCallbacks = [];
26929var ThemeSettingName = "theme";
26930function initializeThemeInCustomizations() {
26931 var _a;
26932 var _b, _c, _d, _e;
26933 // eslint-disable-next-line @typescript-eslint/no-explicit-any
26934 var win = (0, _utilities.getWindow)();
26935 if ((_c = (_b = win) === null || _b === void 0 ? void 0 : _b.FabricConfig) === null || _c === void 0 ? void 0 : _c.legacyTheme) // does everything the `else` clause does and more, such as invoke legacy theming
26936 loadTheme(win.FabricConfig.legacyTheme);
26937 else if (!(0, _utilities.Customizations).getSettings([
26938 ThemeSettingName
26939 ]).theme) {
26940 if ((_e = (_d = win) === null || _d === void 0 ? void 0 : _d.FabricConfig) === null || _e === void 0 ? void 0 : _e.theme) _theme = (0, _createTheme.createTheme)(win.FabricConfig.theme);
26941 // Set the default theme.
26942 (0, _utilities.Customizations).applySettings((_a = {}, _a[ThemeSettingName] = _theme, _a));
26943 }
26944}
26945initializeThemeInCustomizations();
26946function getTheme(depComments) {
26947 if (depComments === void 0) depComments = false;

Callers 1

sanddance-app.jsFile · 0.85

Calls 1

loadThemeFunction · 0.85

Tested by

no test coverage detected