import PropTypes from 'prop-types';
// Copyright (c) 2016-present 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 IncomingWebhookIcon from 'images/incoming_webhook.jpg';
import OutgoingWebhookIcon from 'images/outgoing_webhook.jpg';
import SlashCommandIcon from 'images/slash_command_icon.jpg';
import OAuthIcon from 'images/oauth_icon.png';
import * as Utils from 'utils/utils.jsx';
export default class Integrations extends React.Component {
static get propTypes() {
return {
team: PropTypes.object,
user: PropTypes.object
};
}
constructor(props) {
super(props);
this.updateTitle = this.updateTitle.bind(this);
}
componentDidMount() {
this.updateTitle();
}
updateTitle() {
let currentSiteName = '';
if (global.window.mm_config.SiteName != null) {
currentSiteName = global.window.mm_config.SiteName;
}
document.title = Utils.localizeMessage('admin.sidebar.integrations', 'Integrations') + ' - ' + this.props.team.display_name + ' ' + currentSiteName;
}
render() {
const options = [];
const config = window.mm_config;
const isSystemAdmin = Utils.isSystemAdmin(this.props.user.roles);
if (config.EnableIncomingWebhooks === 'true') {
options.push(