mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
parent
8a75d0b251
commit
6d822bd609
|
@ -6,5 +6,6 @@
|
|||
"win32MutexName": "vscodeoss",
|
||||
"licenseUrl": "https://github.com/Microsoft/vscode/blob/master/LICENSE.txt",
|
||||
"darwinBundleIdentifier": "com.visualstudio.code.oss",
|
||||
"welcomePage": "https://go.microsoft.com/fwlink/?LinkId=723048"
|
||||
"welcomePage": "https://go.microsoft.com/fwlink/?LinkId=723048",
|
||||
"reportIssueUrl": "https://github.com/Microsoft/vscode/issues/new"
|
||||
}
|
|
@ -9,6 +9,7 @@ import * as nls from 'vs/nls';
|
|||
import * as platform from 'vs/base/common/platform';
|
||||
import * as arrays from 'vs/base/common/arrays';
|
||||
import * as env from 'vs/code/electron-main/env';
|
||||
import os = require('os');
|
||||
import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem } from 'electron';
|
||||
import { IWindowsService, WindowsManager, IOpenedPathsList } from 'vs/code/electron-main/windows';
|
||||
import { IPath, VSCodeWindow } from 'vs/code/electron-main/window';
|
||||
|
@ -648,6 +649,15 @@ export class VSCodeMenu {
|
|||
}
|
||||
}
|
||||
|
||||
private generateNewIssueUrl(): string {
|
||||
let quality = process.env['VSCODE_DEV'] ? 'dev' : this.envService.product.quality;
|
||||
let version = `${app.getVersion()}-${quality}`;
|
||||
if (this.envService.product.commit || this.envService.product.date) {
|
||||
version += ` (${this.envService.product.commit || 'Unknown'}, ${this.envService.product.date || 'Unknown'})`;
|
||||
}
|
||||
return `${this.envService.product.reportIssueUrl}?body=Version: ${version}, OS: ${os.type()} ${os.arch()}`;
|
||||
}
|
||||
|
||||
private setHelpMenu(helpMenu: Electron.Menu): void {
|
||||
let toggleDevToolsItem = new MenuItem({
|
||||
label: mnemonicLabel(nls.localize({ key: 'miToggleDevTools', comment: ['&& denotes a mnemonic'] }, "&&Toggle Developer Tools")),
|
||||
|
@ -662,7 +672,7 @@ export class VSCodeMenu {
|
|||
(this.envService.product.documentationUrl || this.envService.product.releaseNotesUrl) ? __separator__() : null,
|
||||
this.envService.product.twitterUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miTwitter', comment: ['&& denotes a mnemonic'] }, "&&Join us on Twitter")), click: () => this.openUrl(this.envService.product.twitterUrl, 'openTwitterUrl') }) : null,
|
||||
this.envService.product.requestFeatureUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miUserVoice', comment: ['&& denotes a mnemonic'] }, "&&Request Features")), click: () => this.openUrl(this.envService.product.requestFeatureUrl, 'openUserVoiceUrl') }) : null,
|
||||
this.envService.product.reportIssueUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miReportIssues', comment: ['&& denotes a mnemonic'] }, "Report &&Issues")), click: () => this.openUrl(this.envService.product.reportIssueUrl, 'openReportIssues') }) : null,
|
||||
this.envService.product.reportIssueUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miReportIssues', comment: ['&& denotes a mnemonic'] }, "Report &&Issues")), click: () => this.openUrl(this.generateNewIssueUrl(), 'openReportIssues') }) : null,
|
||||
(this.envService.product.twitterUrl || this.envService.product.requestFeatureUrl || this.envService.product.reportIssueUrl) ? __separator__() : null,
|
||||
this.envService.product.licenseUrl ? new MenuItem({
|
||||
label: mnemonicLabel(nls.localize({ key: 'miLicense', comment: ['&& denotes a mnemonic'] }, "&&View License")), click: () => {
|
||||
|
|
Loading…
Reference in a new issue