Merge pull request #4381 from matrix-org/t3chguy/rageshake_incompatible_browser
Rageshake: remind user of unsupported browser and send modernizr report
This commit is contained in:
commit
66de06c7b9
3 changed files with 23 additions and 5 deletions
|
@ -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 = <p><b>
|
||||
{ _t("Reminder: Your browser is unsupported, so your experience may be unpredictable.") }
|
||||
</b></p>;
|
||||
}
|
||||
|
||||
return (
|
||||
<BaseDialog className="mx_BugReportDialog" onFinished={this._onCancel}
|
||||
title={_t('Submit debug logs')}
|
||||
contentId='mx_Dialog_content'
|
||||
>
|
||||
<div className="mx_Dialog_content" id='mx_Dialog_content'>
|
||||
{ warning }
|
||||
<p>
|
||||
{ _t(
|
||||
"Debug logs contain application usage data including your " +
|
||||
|
|
|
@ -1528,6 +1528,7 @@
|
|||
"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.",
|
||||
"Before submitting logs, you must <a>create a GitHub issue</a> to describe your problem.": "Before submitting logs, you must <a>create a GitHub issue</a> to describe your problem.",
|
||||
"GitHub issue": "GitHub issue",
|
||||
|
|
|
@ -96,12 +96,14 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
|
|||
body.append('device_id', client.deviceId);
|
||||
}
|
||||
|
||||
const keys = [`ed25519:${client.getDeviceEd25519Key()}`];
|
||||
if (client.getDeviceCurve25519Key) {
|
||||
keys.push(`curve25519:${client.getDeviceCurve25519Key()}`);
|
||||
if (client.isCryptoEnabled()) {
|
||||
const keys = [`ed25519:${client.getDeviceEd25519Key()}`];
|
||||
if (client.getDeviceCurve25519Key) {
|
||||
keys.push(`curve25519:${client.getDeviceCurve25519Key()}`);
|
||||
}
|
||||
body.append('device_keys', keys.join(', '));
|
||||
body.append('cross_signing_key', client.getCrossSigningId());
|
||||
}
|
||||
body.append('device_keys', keys.join(', '));
|
||||
body.append('cross_signing_key', client.getCrossSigningId());
|
||||
|
||||
if (opts.label) {
|
||||
body.append('label', opts.label);
|
||||
|
@ -136,6 +138,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();
|
||||
|
|
Loading…
Reference in a new issue