PLT-2064 Slash command hints don't autocomplete
Этот коммит содержится в:
@@ -18,7 +18,7 @@ class CommandSuggestion extends React.Component {
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<div className='command__title'>
|
<div className='command__title'>
|
||||||
<string>{item.suggestion}</string>
|
<string>{item.suggestion} {item.hint}</string>
|
||||||
</div>
|
</div>
|
||||||
<div className='command__desc'>
|
<div className='command__desc'>
|
||||||
{item.description}
|
{item.description}
|
||||||
|
|||||||
@@ -787,11 +787,13 @@ export function getSuggestedCommands(command, suggestionId, component) {
|
|||||||
data.forEach((cmd) => {
|
data.forEach((cmd) => {
|
||||||
if (('/' + cmd.trigger).indexOf(command) === 0) {
|
if (('/' + cmd.trigger).indexOf(command) === 0) {
|
||||||
let s = '/' + cmd.trigger;
|
let s = '/' + cmd.trigger;
|
||||||
|
let hint = '';
|
||||||
if (cmd.auto_complete_hint && cmd.auto_complete_hint.length !== 0) {
|
if (cmd.auto_complete_hint && cmd.auto_complete_hint.length !== 0) {
|
||||||
s += ' ' + cmd.auto_complete_hint;
|
hint = cmd.auto_complete_hint;
|
||||||
}
|
}
|
||||||
matches.push({
|
matches.push({
|
||||||
suggestion: s,
|
suggestion: s,
|
||||||
|
hint,
|
||||||
description: cmd.auto_complete_desc
|
description: cmd.auto_complete_desc
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user