diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-04-08 11:51:28 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-04-08 11:51:28 -0400 |
commit | 77ee1ce7fee698847e211dc15d4673300901aa48 (patch) | |
tree | 115391ae591f7e008cf357238be612e7482742fc /webapp/components/backstage/integrations.jsx | |
parent | 742d611ba4c08dbc4d30d3ef7a40a872186bd9eb (diff) | |
download | chat-77ee1ce7fee698847e211dc15d4673300901aa48.tar.gz chat-77ee1ce7fee698847e211dc15d4673300901aa48.tar.bz2 chat-77ee1ce7fee698847e211dc15d4673300901aa48.zip |
PLT-2553 Updated backstage page navigation (#2661)
* Updated integrations list based on feedback
* Reorganized Integrations pages
* Repurposed AddIntegration page as a landing page for Integrations
* Moved backstage breadcrumb header into its own component
* Removed unnecessary prop
* Fixed Save links on AddIntegration pages
Diffstat (limited to 'webapp/components/backstage/integrations.jsx')
-rw-r--r-- | webapp/components/backstage/integrations.jsx | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/webapp/components/backstage/integrations.jsx b/webapp/components/backstage/integrations.jsx new file mode 100644 index 000000000..71232ea45 --- /dev/null +++ b/webapp/components/backstage/integrations.jsx @@ -0,0 +1,98 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import React from 'react'; + +import {FormattedMessage} from 'react-intl'; +import IntegrationOption from './integration_option.jsx'; + +import WebhookIcon from 'images/webhook_icon.jpg'; + +export default class Integrations extends React.Component { + render() { + const options = []; + + if (window.mm_config.EnableIncomingWebhooks === 'true') { + options.push( + <IntegrationOption + key='incomingWebhook' + image={WebhookIcon} + title={ + <FormattedMessage + id='integrations.incomingWebhook.title' + defaultMessage='Incoming Webhook' + /> + } + description={ + <FormattedMessage + id='integrations.incomingWebhook.description' + defaultMessage='Incoming webhooks allow external integrations to send messages' + /> + } + link={'/settings/integrations/incoming_webhooks'} + /> + ); + } + + if (window.mm_config.EnableOutgoingWebhooks === 'true') { + options.push( + <IntegrationOption + key='outgoingWebhook' + image={WebhookIcon} + title={ + <FormattedMessage + id='integrations.outgoingWebhook.title' + defaultMessage='Outgoing Webhook' + /> + } + description={ + <FormattedMessage + id='integrations.outgoingWebhook.description' + defaultMessage='Outgoing webhooks allow external integrations to receive and respond to messages' + /> + } + link={'/settings/integrations/outgoing_webhooks'} + /> + ); + } + + if (window.mm_config.EnableCommands === 'true') { + options.push( + <IntegrationOption + key='command' + image={WebhookIcon} + title={ + <FormattedMessage + id='integrations.command.title' + defaultMessage='Slash Command' + /> + } + description={ + <FormattedMessage + id='integrations.command.description' + defaultMessage='Slash commands send events to an external integration' + /> + } + link={'/settings/integrations/commands'} + /> + ); + } + + return ( + <div className='backstage-content row'> + <div className='backstage-header'> + <h1> + <FormattedMessage + id='integrations.header' + defaultMessage='Integrations' + /> + </h1> + </div> + <div> + {options} + </div> + </div> + ); + } +} + |