mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-10 12:54:50 -04:00
Crash Reporting Popup (#879)
* Initial Draft - Add draft crash report window on startup If you want to disable them before/during startup, there is a command line option to force it * Fixes - Update language to be more precise, consistent with settings menu - Actually shut down reporting properly if you disable it - Fix my silly syntax errors * Update text & use Sentry consent --------- Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
+22
-10
@@ -19,6 +19,10 @@
|
||||
#include "prelaunch.hpp"
|
||||
#include "ui.hpp"
|
||||
|
||||
#if DUSK_ENABLE_SENTRY_NATIVE
|
||||
#include "dusk/crash_reporting.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace dusk::ui {
|
||||
@@ -1024,16 +1028,24 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
pane.add_rml("<br/>Choose which notifications can be displayed.");
|
||||
});
|
||||
#if DUSK_ENABLE_SENTRY_NATIVE
|
||||
config_bool_select(leftPane, rightPane, getSettings().backend.enableCrashReporting,
|
||||
{.key = "Crash Reporting",
|
||||
.helpText = "Enable automatic reporting of crashes to the developers.<br/><br/>"
|
||||
"Submissions include logs which may contain sensitive information. "
|
||||
"Refrain from "
|
||||
"enabling reporting if you do not agree with the following "
|
||||
"inclusions:<br/><br/> "
|
||||
"- Operating System<br/>- CPU Architecture<br/>- GPU Model & Driver "
|
||||
"Version<br/>"
|
||||
"- Account Username"});
|
||||
auto& crashReporting = leftPane.add_child<BoolButton>(BoolButton::Props{
|
||||
.key = "Crash Reporting",
|
||||
.getValue =
|
||||
[] { return crash_reporting::get_consent() == crash_reporting::Consent::Given; },
|
||||
.setValue = [](bool enabled) { crash_reporting::set_consent(enabled); },
|
||||
.isDisabled =
|
||||
[] {
|
||||
return crash_reporting::get_consent() == crash_reporting::Consent::Unavailable;
|
||||
},
|
||||
.isModified = [] { return false; },
|
||||
});
|
||||
leftPane.register_control(crashReporting, rightPane, [](Pane& pane) {
|
||||
pane.clear();
|
||||
pane.add_rml("Dusk can automatically send crash reports to the developers. Crash "
|
||||
"reports contain the following:<br/>• Operating system version<br/>• CPU "
|
||||
"architecture<br/>• GPU model & driver version<br/>• File paths (may "
|
||||
"include account username)<br/>• Stack trace");
|
||||
});
|
||||
#endif
|
||||
config_bool_select(leftPane, rightPane, getSettings().backend.skipPreLaunchUI,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user