diff options
author | Corey Hulen <corey@hulen.com> | 2015-11-27 19:58:05 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-11-27 19:58:05 -0800 |
commit | d4eb8743e3bd36b6cd2e7939c9a698d893b215d7 (patch) | |
tree | 442382ad3dd80a6a11fdbe38703ad794cc17287e /web/react/utils | |
parent | 42a001c4e26acaebb7bade2a9b45428578b04164 (diff) | |
parent | c50144de0475da2c5865cb4246f63d285aa452c4 (diff) | |
download | chat-d4eb8743e3bd36b6cd2e7939c9a698d893b215d7.tar.gz chat-d4eb8743e3bd36b6cd2e7939c9a698d893b215d7.tar.bz2 chat-d4eb8743e3bd36b6cd2e7939c9a698d893b215d7.zip |
Merge pull request #1416 from florianorben/PLT-1125
PLT-1125: Add "Preview pre-release features" option
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/constants.jsx | 7 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 372e15556..2009e07dd 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -398,5 +398,12 @@ export default { }, NotificationPrefs: { MENTION: 'mention' + }, + FeatureTogglePrefix: 'feature_enabled_', + PRE_RELEASE_FEATURES: { + MARKDOWN_PREVIEW: { + label: 'markdown_preview', // github issue: https://github.com/mattermost/platform/pull/1389 + description: 'Show markdown preview option in message input box' + } } }; diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 9b2f7e057..80c377d7f 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -1221,3 +1221,7 @@ export function getPostTerm(post) { return postTerm; } + +export function isFeatureEnabled(feature) { + return PreferenceStore.getPreference(Constants.Preferences.CATEGORY_ADVANCED_SETTINGS, Constants.FeatureTogglePrefix + feature.label, {value: 'false'}).value === 'true'; +} |