From 06bab6a38c6a5362eb7450bc93817e745ddefe99 Mon Sep 17 00:00:00 2001 From: Karl Burtram Date: Thu, 12 Apr 2018 17:24:21 -0700 Subject: [PATCH] Add Privacy Statement and License menu items (#1148) * Add Privacy Statement and License menu items * Fix spaces --- src/vs/code/electron-main/menus.ts | 44 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index e17684856d..58b66ff68b 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -1009,28 +1009,28 @@ export class CodeMenu { // product.twitterUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miTwitter', comment: ['&& denotes a mnemonic'] }, "&&Join us on Twitter")), click: () => this.openUrl(product.twitterUrl, 'openTwitterUrl') }) : null, // product.requestFeatureUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miUserVoice', comment: ['&& denotes a mnemonic'] }, "&&Search Feature Requests")), click: () => this.openUrl(product.requestFeatureUrl, 'openUserVoiceUrl') }) : null, reportIssuesItem, - // (product.twitterUrl || product.requestFeatureUrl || product.reportIssueUrl) ? __separator__() : null, - // product.licenseUrl ? new MenuItem({ - // label: mnemonicLabel(nls.localize({ key: 'miLicense', comment: ['&& denotes a mnemonic'] }, "View &&License")), click: () => { - // if (language) { - // const queryArgChar = product.licenseUrl.indexOf('?') > 0 ? '&' : '?'; - // this.openUrl(`${product.licenseUrl}${queryArgChar}lang=${language}`, 'openLicenseUrl'); - // } else { - // this.openUrl(product.licenseUrl, 'openLicenseUrl'); - // } - // } - // }) : null, - // product.privacyStatementUrl ? new MenuItem({ - // label: mnemonicLabel(nls.localize({ key: 'miPrivacyStatement', comment: ['&& denotes a mnemonic'] }, "&&Privacy Statement")), click: () => { - // if (language) { - // const queryArgChar = product.licenseUrl.indexOf('?') > 0 ? '&' : '?'; - // this.openUrl(`${product.privacyStatementUrl}${queryArgChar}lang=${language}`, 'openPrivacyStatement'); - // } else { - // this.openUrl(product.privacyStatementUrl, 'openPrivacyStatement'); - // } - // } - // }) : null, - // (product.licenseUrl || product.privacyStatementUrl) ? __separator__() : null, + (product.twitterUrl || product.requestFeatureUrl || product.reportIssueUrl) ? __separator__() : null, + product.licenseUrl ? new MenuItem({ + label: this.mnemonicLabel(nls.localize({ key: 'miLicense', comment: ['&& denotes a mnemonic'] }, "View &&License")), click: () => { + if (language) { + const queryArgChar = product.licenseUrl.indexOf('?') > 0 ? '&' : '?'; + this.openUrl(`${product.licenseUrl}${queryArgChar}lang=${language}`, 'openLicenseUrl'); + } else { + this.openUrl(product.licenseUrl, 'openLicenseUrl'); + } + } + }) : null, + product.privacyStatementUrl ? new MenuItem({ + label: this.mnemonicLabel(nls.localize({ key: 'miPrivacyStatement', comment: ['&& denotes a mnemonic'] }, "&&Privacy Statement")), click: () => { + if (language) { + const queryArgChar = product.licenseUrl.indexOf('?') > 0 ? '&' : '?'; + this.openUrl(`${product.privacyStatementUrl}${queryArgChar}lang=${language}`, 'openPrivacyStatement'); + } else { + this.openUrl(product.privacyStatementUrl, 'openPrivacyStatement'); + } + } + }) : null, + (product.licenseUrl || product.privacyStatementUrl) ? __separator__() : null, toggleDevToolsItem, isWindows && product.quality !== 'stable' ? showAccessibilityOptions : null ]).forEach(item => helpMenu.append(item));