From 81366cd5e528ae10902436a472b479e83521e70c Mon Sep 17 00:00:00 2001 From: Nicolas Clerc Date: Mon, 7 Mar 2016 23:54:08 +0100 Subject: use pre-released features --- .../user_settings/manage_command_hooks.jsx | 76 +++++++++++++--------- 1 file changed, 47 insertions(+), 29 deletions(-) (limited to 'webapp/components/user_settings/manage_command_hooks.jsx') diff --git a/webapp/components/user_settings/manage_command_hooks.jsx b/webapp/components/user_settings/manage_command_hooks.jsx index 4053a62aa..579b3de14 100644 --- a/webapp/components/user_settings/manage_command_hooks.jsx +++ b/webapp/components/user_settings/manage_command_hooks.jsx @@ -4,9 +4,13 @@ import LoadingScreen from '../loading_screen.jsx'; import * as Client from 'utils/client.jsx'; +import * as Utils from 'utils/utils.jsx'; +import Constants from 'utils/constants.jsx'; import {intlShape, injectIntl, defineMessages, FormattedMessage, FormattedHTMLMessage} from 'react-intl'; +const PreReleaseFeatures = Constants.PRE_RELEASE_FEATURES; + const holders = defineMessages({ requestTypePost: { id: 'user.settings.cmds.request_type_post', @@ -277,11 +281,9 @@ export default class ManageCommandCmds extends React.Component { ); } - cmds.push( -
+ let slashCommandAutocompleteDiv; + if (Utils.isFeatureEnabled(PreReleaseFeatures.SLASHCMD_AUTOCMP)) { + slashCommandAutocompleteDiv = (
{cmd.external_management ? this.props.intl.formatMessage(holders.autocompleteYes) : this.props.intl.formatMessage(holders.autocompleteNo)}
+ ); + } + + cmds.push( +
+ {slashCommandAutocompleteDiv} {triggerDiv}
@@ -433,6 +444,36 @@ export default class ManageCommandCmds extends React.Component { const disableButton = this.state.cmd.url === '' || (this.state.cmd.trigger === '' && !this.state.external_management); + let slashCommandAutocompleteCheckbox; + if (Utils.isFeatureEnabled(PreReleaseFeatures.SLASHCMD_AUTOCMP)) { + slashCommandAutocompleteCheckbox = ( +
+ +
+
+ +
+
+
+ + ); + } + return (
- -
-
- -
-
-
- -
+ {slashCommandAutocompleteCheckbox}