diff --git a/src/platform/node/mock-server/index.ts b/src/platform/node/mock-server/index.ts index 2e8f53aef..8a828ff66 100644 --- a/src/platform/node/mock-server/index.ts +++ b/src/platform/node/mock-server/index.ts @@ -7,6 +7,8 @@ import { BrowserView, ipcMain } from 'electron'; import type { Server } from 'http'; import type { AddressInfo } from 'net'; import { Configuration } from 'eo/platform/node/configuration/lib'; +import Store from 'electron-store'; +const store = new Store(); const protocolReg = new RegExp('^/(http|https)://'); // Solve object circular reference problem @@ -94,9 +96,9 @@ export class MockServer { * start mock server * @param port mock server port */ - async start(view: BrowserView, port = 3040) { + async start(view: BrowserView, port = store.get('mock_port') || 3040) { this.view = view; - portfinder.basePort = port; + portfinder.basePort = Number(port); // Use portfinder for port detection. If the port is found to be occupied, the port will be incremented by 1. const _port = await portfinder.getPortPromise(); @@ -105,6 +107,7 @@ export class MockServer { .listen(_port, () => { const { port } = this.server.address() as AddressInfo; this.mockUrl = `http://127.0.0.1:${port}`; + store.set('mock_port', port); console.log(`mock service is started:${this.mockUrl}`); resolve(this.mockUrl); }) diff --git a/src/workbench/browser/src/app/pages/api/http/test/result-response/api-test-result-response.component.html b/src/workbench/browser/src/app/pages/api/http/test/result-response/api-test-result-response.component.html index 2f6e15b98..8f9a74b8a 100644 --- a/src/workbench/browser/src/app/pages/api/http/test/result-response/api-test-result-response.component.html +++ b/src/workbench/browser/src/app/pages/api/http/test/result-response/api-test-result-response.component.html @@ -51,6 +51,7 @@ diff --git a/src/workbench/browser/src/app/pages/extension/detail/extension-detail.component.html b/src/workbench/browser/src/app/pages/extension/detail/extension-detail.component.html index 260a8f7d8..80cb3be6e 100644 --- a/src/workbench/browser/src/app/pages/extension/detail/extension-detail.component.html +++ b/src/workbench/browser/src/app/pages/extension/detail/extension-detail.component.html @@ -64,7 +64,7 @@ - + @@ -96,4 +96,4 @@

[12.0.1] - 2022-03-03

--> - \ No newline at end of file + diff --git a/src/workbench/browser/src/app/pages/extension/detail/extension-detail.component.ts b/src/workbench/browser/src/app/pages/extension/detail/extension-detail.component.ts index 0c7f0227e..2f04e5d60 100644 --- a/src/workbench/browser/src/app/pages/extension/detail/extension-detail.component.ts +++ b/src/workbench/browser/src/app/pages/extension/detail/extension-detail.component.ts @@ -82,6 +82,7 @@ export class ExtensionDetailComponent implements OnInit { if (this.extensionDetail?.features?.configuration) { this.nzSelectedIndex = ~~this.route.snapshot.queryParams.tab; } + this.fetchChangelog(this.language.systemLanguage); } async fetchChangelog(locale = '') { @@ -101,7 +102,7 @@ export class ExtensionDetailComponent implements OnInit { } else if (!locale && response.status === 404) { try { // const result = await fetch(`https://eoapi.eolinker.com/npm/${this.extensionDetail.name}`, { - const result = await fetch(`https://regi3stry.npmjs.org/${this.extensionDetail.name}`, { + const result = await fetch(`https://registry.npmjs.org/${this.extensionDetail.name}`, { headers: { // if fullmeta // accept: ' application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*', diff --git a/src/workbench/browser/src/app/shared/components/env/env.component.html b/src/workbench/browser/src/app/shared/components/env/env.component.html index 434baf03f..814853826 100644 --- a/src/workbench/browser/src/app/shared/components/env/env.component.html +++ b/src/workbench/browser/src/app/shared/components/env/env.component.html @@ -11,13 +11,8 @@
{{ item.name }} - +
@@ -38,20 +33,19 @@ -

Environment variable: API Documentation/Test can use {{ varName }} to refer to the environment variable

- +

Environment variable: API Documentation/Test can use {{ varName }} to refer to the + environment variable

+ - + + -