PLT-1750 Moved slash commands to backstage
* Added slash commands to InstalledIntegrations page * Reset installed integration type filter if there is no longer any integrations of the selected type * Added pages to backstage to add slash commands * Cleaned up internationalization for slash commands * Added ability to regen slash command tokens from backstage * Removed Integrations tab from UserSettings
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
c12d997f24
Коммит
b3edd32aee
@@ -1258,3 +1258,80 @@ export function regenOutgoingHookToken(id) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function listTeamCommands() {
|
||||
if (isCallInProgress('listTeamCommands')) {
|
||||
return;
|
||||
}
|
||||
|
||||
callTracker.listTeamCommands = utils.getTimestamp();
|
||||
|
||||
client.listTeamCommands(
|
||||
(data) => {
|
||||
callTracker.listTeamCommands = 0;
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_COMMANDS,
|
||||
commands: data
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
callTracker.listTeamCommands = 0;
|
||||
dispatchError(err, 'listTeamCommands');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function addCommand(command, success, error) {
|
||||
client.addCommand(
|
||||
command,
|
||||
(data) => {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_COMMAND,
|
||||
command: data
|
||||
});
|
||||
|
||||
if (success) {
|
||||
success();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
if (error) {
|
||||
error(err);
|
||||
} else {
|
||||
dispatchError(err, 'addCommand');
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function deleteCommand(id) {
|
||||
client.deleteCommand(
|
||||
{id},
|
||||
() => {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.REMOVED_COMMAND,
|
||||
id
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
dispatchError(err, 'deleteCommand');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function regenCommandToken(id) {
|
||||
client.regenCommandToken(
|
||||
{id},
|
||||
(data) => {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.UPDATED_COMMAND,
|
||||
command: data
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
dispatchError(err, 'regenCommandToken');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,10 @@ export default {
|
||||
RECEIVED_OUTGOING_WEBHOOK: null,
|
||||
UPDATED_OUTGOING_WEBHOOK: null,
|
||||
REMOVED_OUTGOING_WEBHOOK: null,
|
||||
RECEIVED_COMMANDS: null,
|
||||
RECEIVED_COMMAND: null,
|
||||
UPDATED_COMMAND: null,
|
||||
REMOVED_COMMAND: null,
|
||||
|
||||
RECEIVED_MSG: null,
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user