Adding UI
Этот коммит содержится в:
@@ -5,6 +5,7 @@ import SettingItemMin from '../setting_item_min.jsx';
|
||||
import SettingItemMax from '../setting_item_max.jsx';
|
||||
import ManageIncomingHooks from './manage_incoming_hooks.jsx';
|
||||
import ManageOutgoingHooks from './manage_outgoing_hooks.jsx';
|
||||
import ManageCommandHooks from './manage_command_hooks.jsx';
|
||||
|
||||
export default class UserSettingsIntegrationsTab extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -20,6 +21,7 @@ export default class UserSettingsIntegrationsTab extends React.Component {
|
||||
render() {
|
||||
let incomingHooksSection;
|
||||
let outgoingHooksSection;
|
||||
let commandHooksSection;
|
||||
var inputs = [];
|
||||
|
||||
if (global.window.mm_config.EnableIncomingWebhooks === 'true') {
|
||||
@@ -84,6 +86,37 @@ export default class UserSettingsIntegrationsTab extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
if (global.window.mm_config.EnableCommands === 'true') {
|
||||
if (this.props.activeSection === 'command-hooks') {
|
||||
inputs.push(
|
||||
<ManageCommandHooks key='command-hook-ui' />
|
||||
);
|
||||
|
||||
commandHooksSection = (
|
||||
<SettingItemMax
|
||||
title='Commands'
|
||||
width='medium'
|
||||
inputs={inputs}
|
||||
updateSection={(e) => {
|
||||
this.updateSection('');
|
||||
e.preventDefault();
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
commandHooksSection = (
|
||||
<SettingItemMin
|
||||
title='Commands'
|
||||
width='medium'
|
||||
describe='Manage your commands'
|
||||
updateSection={() => {
|
||||
this.updateSection('command-hooks');
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className='modal-header'>
|
||||
@@ -114,6 +147,8 @@ export default class UserSettingsIntegrationsTab extends React.Component {
|
||||
<div className='divider-light'/>
|
||||
{outgoingHooksSection}
|
||||
<div className='divider-dark'/>
|
||||
{commandHooksSection}
|
||||
<div className='divider-dark'/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Ссылка в новой задаче
Block a user