From 0153f39c10bedae25cd04abd74ffa0406ccb07dd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 9 Apr 2020 22:55:28 +0100 Subject: [PATCH] Rageshake, remind user of unsupported browser and report missing features in report Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/BugReportDialog.js | 8 ++++++++ src/rageshake/submit-rageshake.js | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/src/components/views/dialogs/BugReportDialog.js b/src/components/views/dialogs/BugReportDialog.js index 6e337d53dc..2f7ad4163d 100644 --- a/src/components/views/dialogs/BugReportDialog.js +++ b/src/components/views/dialogs/BugReportDialog.js @@ -137,12 +137,20 @@ export default class BugReportDialog extends React.Component { ); } + let warning; + if (window.Modernizr && Object.values(window.Modernizr).some(support => support === false)) { + warning =

+ { _t("Your browser is unsupported, you accepted that things may not work.") } +

; + } + return (
+ { warning }

{ _t( "Debug logs contain application usage data including your " + diff --git a/src/rageshake/submit-rageshake.js b/src/rageshake/submit-rageshake.js index 00ef87f89c..2c529ea0b9 100644 --- a/src/rageshake/submit-rageshake.js +++ b/src/rageshake/submit-rageshake.js @@ -136,6 +136,13 @@ export default async function sendBugReport(bugReportEndpoint, opts) { } catch (e) {} } + if (window.Modernizr) { + const missingFeatures = Object.keys(window.Modernizr).filter(key => window.Modernizr[key] === false); + if (missingFeatures.length > 0) { + body.append("modernizr_missing_features", missingFeatures.join(", ")); + } + } + if (opts.sendLogs) { progressCallback(_t("Collecting logs")); const logs = await rageshake.getLogsForReport();