From 1605fa5102e7d5d76a02456130097d3ab82c2a2b Mon Sep 17 00:00:00 2001 From: David Meza Date: Tue, 5 Sep 2017 19:28:46 -0500 Subject: Configs for themes in `Display Settings`: hide themes options, hide custom themes, specific list of themes (#7173) * Add configuration to enable or disable choosing themes in Display Settings. Only for Licensed servers. * Add configuration to enable or disable choosing custom themes in Display Settings. Only for Licensed servers. * Add configuration to enable or disable a specific list of themes to choose in Display Settings. Only for Licensed servers. * Added config value and logic for "DefaultTheme" * Fix problem with undefined values when the server is not licensed --- webapp/stores/preference_store.jsx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'webapp/stores/preference_store.jsx') diff --git a/webapp/stores/preference_store.jsx b/webapp/stores/preference_store.jsx index f3476d9ea..cd8ae68be 100644 --- a/webapp/stores/preference_store.jsx +++ b/webapp/stores/preference_store.jsx @@ -141,6 +141,12 @@ class PreferenceStore extends EventEmitter { return this.getObject(Constants.Preferences.CATEGORY_THEME, ''); } + for (const k in Constants.THEMES) { + if (Constants.THEMES.hasOwnProperty(k) && k === global.mm_config.DefaultTheme) { + return Constants.THEMES[k]; + } + } + return Constants.THEMES.default; } -- cgit v1.2.3-1-g7c22