feat(feedback): optionally include last exception

This commit is contained in:
goat 2021-09-27 23:49:45 +02:00
parent 689b8fa847
commit ef16e346c6
No known key found for this signature in database
GPG key ID: F18F057873895461
3 changed files with 21 additions and 4 deletions

View file

@ -72,6 +72,7 @@ namespace Dalamud.Interface.Internal.Windows
private bool feedbackModalOnNextFrame = false;
private string feedbackModalBody = string.Empty;
private string feedbackModalContact = string.Empty;
private bool feedbackModalIncludeException = false;
private PluginManifest? feedbackPlugin = null;
private int updatePluginCount = 0;
@ -469,12 +470,14 @@ namespace Dalamud.Interface.Internal.Windows
ImGui.Text(Locs.FeedbackModal_Text);
ImGui.Spacing();
ImGui.InputTextMultiline("Feedback Content", ref this.feedbackModalBody, 1000, new Vector2(400, 200));
ImGui.InputTextMultiline("###FeedbackContent", ref this.feedbackModalBody, 1000, new Vector2(400, 200));
ImGui.Spacing();
ImGui.InputText("Contact Information", ref this.feedbackModalContact, 100);
ImGui.Checkbox("Include last error message", ref this.feedbackModalIncludeException);
ImGui.Spacing();
ImGui.TextColored(ImGuiColors.DalamudGrey, Locs.FeedbackModal_Hint);
@ -486,7 +489,7 @@ namespace Dalamud.Interface.Internal.Windows
{
if (this.feedbackPlugin != null)
{
Task.Run(async () => await BugBait.SendFeedback(this.feedbackPlugin, this.feedbackModalBody, this.feedbackModalContact))
Task.Run(async () => await BugBait.SendFeedback(this.feedbackPlugin, this.feedbackModalBody, this.feedbackModalContact, this.feedbackModalIncludeException))
.ContinueWith(
t =>
{
@ -515,6 +518,7 @@ namespace Dalamud.Interface.Internal.Windows
this.feedbackModalDrawing = true;
this.feedbackModalBody = string.Empty;
this.feedbackModalContact = string.Empty;
this.feedbackModalIncludeException = false;
}
}
@ -2263,7 +2267,7 @@ namespace Dalamud.Interface.Internal.Windows
public static string FeedbackModal_Text => Loc.Localize("InstallerFeedbackInfo", "You can send feedback to the developer of this plugin here.\nYou can include your Discord tag or email address if you wish to give them the opportunity to answer.");
public static string FeedbackModal_Hint => Loc.Localize("InstallerFeedbackHint", "All plugin developers will be able to see your feedback.\nPlease never include any personal or revealing information.\nThe collected feedback is not stored and immediately relayed to Discord.");
public static string FeedbackModal_Hint => Loc.Localize("InstallerFeedbackHint", "All plugin developers will be able to see your feedback.\nPlease never include any personal or revealing information.\nIf you chose to include the last error message, information like your Windows username may be included.\n\nThe collected feedback is not stored on our end and immediately relayed to Discord.");
public static string FeedbackModal_NotificationSuccess => Loc.Localize("InstallerFeedbackNotificationSuccess", "Your feedback was sent successfully!");