UX: Add theme settings and value transformers (#67)
This commit adds the above for these core site settings: * search_experience * enable_welcome_banner Since for horizon we want better control of the default experience of these settings OOTB. See also https://github.com/discourse/discourse/pull/31917
This commit is contained in:
+10
@@ -1,8 +1,18 @@
|
||||
import { apiInitializer } from "discourse/lib/api";
|
||||
import CustomColorHtmlClass from "../components/custom-color-html-class";
|
||||
import CustomUserPalette from "../components/custom-user-palette";
|
||||
import ExperimentalScreen from "../components/experimental-screen";
|
||||
|
||||
export default apiInitializer("1.8.0", (api) => {
|
||||
api.renderInOutlet("above-main-container", ExperimentalScreen);
|
||||
api.renderInOutlet("above-main-container", CustomColorHtmlClass);
|
||||
api.renderInOutlet("sidebar-footer-actions", CustomUserPalette);
|
||||
|
||||
api.registerValueTransformer("site-setting-enable-welcome-banner", () => {
|
||||
return settings.enable_welcome_banner;
|
||||
});
|
||||
|
||||
api.registerValueTransformer("site-setting-search-experience", () => {
|
||||
return settings.search_experience;
|
||||
});
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
import { apiInitializer } from "discourse/lib/api";
|
||||
import CustomUserPalette from "../components/custom-user-palette";
|
||||
|
||||
export default apiInitializer("1.8.0", (api) => {
|
||||
api.renderInOutlet("sidebar-footer-actions", CustomUserPalette);
|
||||
});
|
||||
Reference in New Issue
Block a user