From b3edd32aee47a0b123870de58664600acc17087b Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 5 Apr 2016 09:29:01 -0400 Subject: PLT-1750 Moved slash commands to backstage * Added slash commands to InstalledIntegrations page * Reset installed integration type filter if there is no longer any integrations of the selected type * Added pages to backstage to add slash commands * Cleaned up internationalization for slash commands * Added ability to regen slash command tokens from backstage * Removed Integrations tab from UserSettings --- .../user_settings/user_settings_integrations.jsx | 126 --------------------- 1 file changed, 126 deletions(-) delete mode 100644 webapp/components/user_settings/user_settings_integrations.jsx (limited to 'webapp/components/user_settings/user_settings_integrations.jsx') diff --git a/webapp/components/user_settings/user_settings_integrations.jsx b/webapp/components/user_settings/user_settings_integrations.jsx deleted file mode 100644 index 37081b863..000000000 --- a/webapp/components/user_settings/user_settings_integrations.jsx +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import $ from 'jquery'; -import SettingItemMin from '../setting_item_min.jsx'; -import SettingItemMax from '../setting_item_max.jsx'; -import ManageCommandHooks from './manage_command_hooks.jsx'; - -import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl'; - -const holders = defineMessages({ - cmdName: { - id: 'user.settings.integrations.commands', - defaultMessage: 'Slash Commands' - }, - cmdDesc: { - id: 'user.settings.integrations.commandsDescription', - defaultMessage: 'Manage your slash commands' - } -}); - -import React from 'react'; - -class UserSettingsIntegrationsTab extends React.Component { - constructor(props) { - super(props); - - this.updateSection = this.updateSection.bind(this); - - this.state = {}; - } - updateSection(section) { - $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update'); - this.props.updateSection(section); - } - render() { - let commandHooksSection; - var inputs = []; - const {formatMessage} = this.props.intl; - - if (global.window.mm_config.EnableCommands === 'true') { - if (this.props.activeSection === 'command-hooks') { - inputs.push( - - ); - - commandHooksSection = ( - { - this.updateSection(''); - e.preventDefault(); - }} - /> - ); - } else { - commandHooksSection = ( - { - this.updateSection('command-hooks'); - }} - /> - ); - } - } - - return ( -
-
- -

-
- -
- -

-
-
-

- -

-
- {commandHooksSection} -
-
-
- ); - } -} - -UserSettingsIntegrationsTab.propTypes = { - intl: intlShape.isRequired, - user: React.PropTypes.object, - updateSection: React.PropTypes.func, - updateTab: React.PropTypes.func, - activeSection: React.PropTypes.string, - closeModal: React.PropTypes.func.isRequired, - collapseModal: React.PropTypes.func.isRequired -}; - -export default injectIntl(UserSettingsIntegrationsTab); -- cgit v1.2.3-1-g7c22