Show/hide integrations properly based off config settings.
Этот коммит содержится в:
@@ -34,6 +34,7 @@ export default class UserSettingsIntegrationsTab extends React.Component {
|
|||||||
let outgoingHooksSection;
|
let outgoingHooksSection;
|
||||||
var inputs = [];
|
var inputs = [];
|
||||||
|
|
||||||
|
if (global.window.config.EnableIncomingWebhooks === 'true') {
|
||||||
if (this.props.activeSection === 'incoming-hooks') {
|
if (this.props.activeSection === 'incoming-hooks') {
|
||||||
inputs.push(
|
inputs.push(
|
||||||
<ManageIncomingHooks />
|
<ManageIncomingHooks />
|
||||||
@@ -62,7 +63,9 @@ export default class UserSettingsIntegrationsTab extends React.Component {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (global.window.config.EnableOutgoingWebhooks === 'true') {
|
||||||
if (this.props.activeSection === 'outgoing-hooks') {
|
if (this.props.activeSection === 'outgoing-hooks') {
|
||||||
inputs.push(
|
inputs.push(
|
||||||
<ManageOutgoingHooks />
|
<ManageOutgoingHooks />
|
||||||
@@ -89,6 +92,7 @@ export default class UserSettingsIntegrationsTab extends React.Component {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export default class UserSettingsModal extends React.Component {
|
|||||||
if (global.window.config.EnableOAuthServiceProvider === 'true') {
|
if (global.window.config.EnableOAuthServiceProvider === 'true') {
|
||||||
tabs.push({name: 'developer', uiName: 'Developer', icon: 'glyphicon glyphicon-th'});
|
tabs.push({name: 'developer', uiName: 'Developer', icon: 'glyphicon glyphicon-th'});
|
||||||
}
|
}
|
||||||
if (global.window.config.EnableIncomingWebhooks === 'true') {
|
if (global.window.config.EnableIncomingWebhooks === 'true' || global.window.config.EnableOutgoingWebhooks === 'true') {
|
||||||
tabs.push({name: 'integrations', uiName: 'Integrations', icon: 'glyphicon glyphicon-transfer'});
|
tabs.push({name: 'integrations', uiName: 'Integrations', icon: 'glyphicon glyphicon-transfer'});
|
||||||
}
|
}
|
||||||
tabs.push({name: 'display', uiName: 'Display', icon: 'glyphicon glyphicon-eye-open'});
|
tabs.push({name: 'display', uiName: 'Display', icon: 'glyphicon glyphicon-eye-open'});
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user