forked from openkylin/kylin-code
product.json文件中没有releaseNotesUrl时,命令面板不注册显示releaseNote命令.
This commit is contained in:
parent
0a3b6a331d
commit
dd544b1ebb
|
@ -110,7 +110,7 @@ export class ReleaseNotesManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
const versionLabel = match[1].replace(/\./g, '_');
|
const versionLabel = match[1].replace(/\./g, '_');
|
||||||
const baseUrl = 'https://code.visualstudio.com/raw';
|
const baseUrl = 'https://0.0.0.0/raw';
|
||||||
const url = `${baseUrl}/v${versionLabel}.md`;
|
const url = `${baseUrl}/v${versionLabel}.md`;
|
||||||
const unassigned = nls.localize('unassigned', "unassigned");
|
const unassigned = nls.localize('unassigned', "unassigned");
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ export class ReleaseNotesManager {
|
||||||
|
|
||||||
private async addGAParameters(uri: URI, origin: string, experiment = '1'): Promise<URI> {
|
private async addGAParameters(uri: URI, origin: string, experiment = '1'): Promise<URI> {
|
||||||
if (supportsTelemetry(this._productService, this._environmentService) && getTelemetryLevel(this._configurationService) === TelemetryLevel.USAGE) {
|
if (supportsTelemetry(this._productService, this._environmentService) && getTelemetryLevel(this._configurationService) === TelemetryLevel.USAGE) {
|
||||||
if (uri.scheme === 'https' && uri.authority === 'code.visualstudio.com') {
|
if (uri.scheme === 'https' && uri.authority === '0.0.0.0') {
|
||||||
return uri.with({ query: `${uri.query ? uri.query + '&' : ''}utm_source=VsCode&utm_medium=${encodeURIComponent(origin)}&utm_content=${encodeURIComponent(experiment)}` });
|
return uri.with({ query: `${uri.query ? uri.query + '&' : ''}utm_source=VsCode&utm_medium=${encodeURIComponent(origin)}&utm_content=${encodeURIComponent(experiment)}` });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -214,9 +214,9 @@ export class ReleaseNotesManager {
|
||||||
return `<!DOCTYPE html>
|
return `<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<base href="https://code.visualstudio.com/raw/">
|
<base href="https://0.0.0.0/raw/">
|
||||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
||||||
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; style-src 'nonce-${nonce}' https://code.visualstudio.com;">
|
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; style-src 'nonce-${nonce}' https://0.0.0.0;">
|
||||||
<style nonce="${nonce}">
|
<style nonce="${nonce}">
|
||||||
${DEFAULT_MARKDOWN_STYLES}
|
${DEFAULT_MARKDOWN_STYLES}
|
||||||
${css}
|
${css}
|
||||||
|
|
|
@ -25,8 +25,6 @@ workbench.registerWorkbenchContribution(SwitchProductQualityContribution, Lifecy
|
||||||
const actionRegistry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
|
const actionRegistry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
|
||||||
|
|
||||||
// Editor
|
// Editor
|
||||||
actionRegistry
|
|
||||||
.registerWorkbenchAction(SyncActionDescriptor.from(ShowCurrentReleaseNotesAction), `${product.nameShort}: Show Release Notes`, product.nameShort);
|
|
||||||
|
|
||||||
actionRegistry
|
actionRegistry
|
||||||
.registerWorkbenchAction(SyncActionDescriptor.from(CheckForVSCodeUpdateAction), `${product.nameShort}: Check for Update`, product.nameShort, CONTEXT_UPDATE_STATE.isEqualTo(StateType.Idle));
|
.registerWorkbenchAction(SyncActionDescriptor.from(CheckForVSCodeUpdateAction), `${product.nameShort}: Check for Update`, product.nameShort, CONTEXT_UPDATE_STATE.isEqualTo(StateType.Idle));
|
||||||
|
@ -85,6 +83,10 @@ registerAction2(RestartToUpdateAction);
|
||||||
|
|
||||||
// Menu
|
// Menu
|
||||||
if (ShowCurrentReleaseNotesAction.AVAILABE) {
|
if (ShowCurrentReleaseNotesAction.AVAILABE) {
|
||||||
|
actionRegistry
|
||||||
|
.registerWorkbenchAction(SyncActionDescriptor.from(ShowCurrentReleaseNotesAction), `${product.nameShort}: Show Release Notes`, product.nameShort);
|
||||||
|
|
||||||
|
|
||||||
MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
|
MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
|
||||||
group: '1_welcome',
|
group: '1_welcome',
|
||||||
command: {
|
command: {
|
||||||
|
|
Loading…
Reference in New Issue