use pre-released features
Этот коммит содержится в:
@@ -4,9 +4,13 @@
|
|||||||
import LoadingScreen from '../loading_screen.jsx';
|
import LoadingScreen from '../loading_screen.jsx';
|
||||||
|
|
||||||
import * as Client from 'utils/client.jsx';
|
import * as Client from 'utils/client.jsx';
|
||||||
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
import {intlShape, injectIntl, defineMessages, FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
import {intlShape, injectIntl, defineMessages, FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
||||||
|
|
||||||
|
const PreReleaseFeatures = Constants.PRE_RELEASE_FEATURES;
|
||||||
|
|
||||||
const holders = defineMessages({
|
const holders = defineMessages({
|
||||||
requestTypePost: {
|
requestTypePost: {
|
||||||
id: 'user.settings.cmds.request_type_post',
|
id: 'user.settings.cmds.request_type_post',
|
||||||
@@ -277,11 +281,9 @@ export default class ManageCommandCmds extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmds.push(
|
let slashCommandAutocompleteDiv;
|
||||||
<div
|
if (Utils.isFeatureEnabled(PreReleaseFeatures.SLASHCMD_AUTOCMP)) {
|
||||||
key={cmd.id}
|
slashCommandAutocompleteDiv = (
|
||||||
className='webhook__item webcmd__item'
|
|
||||||
>
|
|
||||||
<div className='padding-top x2'>
|
<div className='padding-top x2'>
|
||||||
<strong>
|
<strong>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
@@ -290,6 +292,15 @@ export default class ManageCommandCmds extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</strong><span className='word-break--all'>{cmd.external_management ? this.props.intl.formatMessage(holders.autocompleteYes) : this.props.intl.formatMessage(holders.autocompleteNo)}</span>
|
</strong><span className='word-break--all'>{cmd.external_management ? this.props.intl.formatMessage(holders.autocompleteYes) : this.props.intl.formatMessage(holders.autocompleteNo)}</span>
|
||||||
</div>
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
cmds.push(
|
||||||
|
<div
|
||||||
|
key={cmd.id}
|
||||||
|
className='webhook__item webcmd__item'
|
||||||
|
>
|
||||||
|
{slashCommandAutocompleteDiv}
|
||||||
{triggerDiv}
|
{triggerDiv}
|
||||||
<div className='padding-top x2 webcmd__url'>
|
<div className='padding-top x2 webcmd__url'>
|
||||||
<strong>
|
<strong>
|
||||||
@@ -433,21 +444,9 @@ export default class ManageCommandCmds extends React.Component {
|
|||||||
|
|
||||||
const disableButton = this.state.cmd.url === '' || (this.state.cmd.trigger === '' && !this.state.external_management);
|
const disableButton = this.state.cmd.url === '' || (this.state.cmd.trigger === '' && !this.state.external_management);
|
||||||
|
|
||||||
return (
|
let slashCommandAutocompleteCheckbox;
|
||||||
<div key='addCommandCmd'>
|
if (Utils.isFeatureEnabled(PreReleaseFeatures.SLASHCMD_AUTOCMP)) {
|
||||||
<FormattedHTMLMessage
|
slashCommandAutocompleteCheckbox = (
|
||||||
id='user.settings.cmds.add_desc'
|
|
||||||
defaultMessage='Create slash commands to send events to external integrations and receive a response. For example typing `/patient Joe Smith` could bring back search results from your internal health records management system for the name “Joe Smith”. Please see <a href="http://docs.mattermost.com/developer/slash-commands.html">Slash commands documentation</a> for detailed instructions. View all slash commands configured on this team below.'
|
|
||||||
/>
|
|
||||||
<div><label className='control-label padding-top x2'>
|
|
||||||
<FormattedMessage
|
|
||||||
id='user.settings.cmds.add_new'
|
|
||||||
defaultMessage='Add a new command'
|
|
||||||
/>
|
|
||||||
</label></div>
|
|
||||||
<div className='padding-top divider-light'></div>
|
|
||||||
<div className='padding-top'>
|
|
||||||
|
|
||||||
<div className='padding-top x2'>
|
<div className='padding-top x2'>
|
||||||
<label className='control-label'>
|
<label className='control-label'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
@@ -472,7 +471,26 @@ export default class ManageCommandCmds extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div key='addCommandCmd'>
|
||||||
|
<FormattedHTMLMessage
|
||||||
|
id='user.settings.cmds.add_desc'
|
||||||
|
defaultMessage='Create slash commands to send events to external integrations and receive a response. For example typing `/patient Joe Smith` could bring back search results from your internal health records management system for the name “Joe Smith”. Please see <a href="http://docs.mattermost.com/developer/slash-commands.html">Slash commands documentation</a> for detailed instructions. View all slash commands configured on this team below.'
|
||||||
|
/>
|
||||||
|
<div><label className='control-label padding-top x2'>
|
||||||
|
<FormattedMessage
|
||||||
|
id='user.settings.cmds.add_new'
|
||||||
|
defaultMessage='Add a new command'
|
||||||
|
/>
|
||||||
|
</label></div>
|
||||||
|
<div className='padding-top divider-light'></div>
|
||||||
|
<div className='padding-top'>
|
||||||
|
|
||||||
<div className='padding-top x2'>
|
<div className='padding-top x2'>
|
||||||
|
{slashCommandAutocompleteCheckbox}
|
||||||
<label className='control-label'>
|
<label className='control-label'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='user.settings.cmds.trigger'
|
id='user.settings.cmds.trigger'
|
||||||
|
|||||||
@@ -51,6 +51,10 @@ const holders = defineMessages({
|
|||||||
EMBED_TOGGLE: {
|
EMBED_TOGGLE: {
|
||||||
id: 'user.settings.advance.embed_toggle',
|
id: 'user.settings.advance.embed_toggle',
|
||||||
defaultMessage: 'Show toggle for all embed previews'
|
defaultMessage: 'Show toggle for all embed previews'
|
||||||
|
},
|
||||||
|
SLASHCMD_AUTOCMP: {
|
||||||
|
id: 'user.settings.advance.slashCmd_autocmp',
|
||||||
|
defaultMessage: 'Enable external application to offer slash command autocomplete'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1091,6 +1091,7 @@
|
|||||||
"tutorial_tip.seen": "Seen this before? ",
|
"tutorial_tip.seen": "Seen this before? ",
|
||||||
"upload_overlay.info": "Drop a file to upload it.",
|
"upload_overlay.info": "Drop a file to upload it.",
|
||||||
"user.settings.advance.embed_preview": "Show preview snippet of links below message",
|
"user.settings.advance.embed_preview": "Show preview snippet of links below message",
|
||||||
|
"user.settings.advance.slashCmd_autocmp": "Enable external application to offer slash command autocomplete",
|
||||||
"user.settings.advance.embed_toggle": "Show toggle for all embed previews",
|
"user.settings.advance.embed_toggle": "Show toggle for all embed previews",
|
||||||
"user.settings.advance.enabled": "enabled",
|
"user.settings.advance.enabled": "enabled",
|
||||||
"user.settings.advance.feature": " Feature ",
|
"user.settings.advance.feature": " Feature ",
|
||||||
|
|||||||
@@ -560,6 +560,10 @@ export default {
|
|||||||
EMBED_TOGGLE: {
|
EMBED_TOGGLE: {
|
||||||
label: 'embed_toggle',
|
label: 'embed_toggle',
|
||||||
description: 'Show toggle for all embed previews'
|
description: 'Show toggle for all embed previews'
|
||||||
|
},
|
||||||
|
SLASHCMD_AUTOCMP: {
|
||||||
|
label: 'slashCmd_autocmp',
|
||||||
|
description: 'Enable external application to offer slash command autocomplete'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
OVERLAY_TIME_DELAY: 400,
|
OVERLAY_TIME_DELAY: 400,
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user