Add a "Telemetry Opt-Out" menu item (#1172)

This commit is contained in:
Karl Burtram
2018-04-17 14:15:56 -07:00
committed by GitHub
parent aa243a8aae
commit b9c877a109

View File

@@ -1030,6 +1030,16 @@ export class CodeMenu {
}
}
}) : null,
product.telemetryOptOutUrl ? new MenuItem({
label: this.mnemonicLabel(nls.localize({ key: 'mTelemetryOptOut', comment: ['&& denotes a mnemonic'] }, "Telemetry &&Opt-Out")), click: () => {
if (language) {
const queryArgChar = product.telemetryOptOutUrl.indexOf('?') > 0 ? '&' : '?';
this.openUrl(`${product.telemetryOptOutUrl}${queryArgChar}lang=${language}`, 'openTelemetryOptOut');
} else {
this.openUrl(product.telemetryOptOutUrl, 'openTelemetryOptOut');
}
}
}) : null,
(product.licenseUrl || product.privacyStatementUrl) ? __separator__() : null,
toggleDevToolsItem,
isWindows && product.quality !== 'stable' ? showAccessibilityOptions : null