From 881848b98b54e8ea921af0a7746c40ca85dd2185 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 19 Apr 2020 12:19:31 +0100 Subject: [PATCH] Add modal to confirm that rageshake from cmd was sent Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/SlashCommands.tsx | 16 ++++++++++++---- src/i18n/strings/en_EN.json | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 68bbfa97f3..76472e4d66 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -920,10 +920,18 @@ export const Commands = [ description: _td("Send a bug report with logs"), args: "", runFn: function(roomId, args) { - return success(sendBugReport(SdkConfig.get().bug_report_endpoint_url, { - userText: args, - sendLogs: true, - })); + return success( + sendBugReport(SdkConfig.get().bug_report_endpoint_url, { + userText: args, + sendLogs: true, + }).then(() => { + const InfoDialog = sdk.getComponent('dialogs.InfoDialog'); + Modal.createTrackedDialog('Slash Commands', 'Rageshake sent', InfoDialog, { + title: _t('Logs sent'), + description: _t('Thank you!'), + }); + }), + ); }, category: CommandCategories.advanced, }), diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a9076a77a2..6ed89e927d 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -217,6 +217,8 @@ "Displays list of commands with usages and descriptions": "Displays list of commands with usages and descriptions", "Displays information about a user": "Displays information about a user", "Send a bug report with logs": "Send a bug report with logs", + "Logs sent": "Logs sent", + "Thank you!": "Thank you!", "Displays action": "Displays action", "Reason": "Reason", "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.", @@ -1528,8 +1530,6 @@ "Close dialog": "Close dialog", "Please tell us what went wrong or, better, create a GitHub issue that describes the problem.": "Please tell us what went wrong or, better, create a GitHub issue that describes the problem.", "Preparing to send logs": "Preparing to send logs", - "Logs sent": "Logs sent", - "Thank you!": "Thank you!", "Failed to send logs: ": "Failed to send logs: ", "Reminder: Your browser is unsupported, so your experience may be unpredictable.": "Reminder: Your browser is unsupported, so your experience may be unpredictable.", "Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.",