From 899e578e1679dec8d0a82c1822270cc04f090b83 Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Thu, 23 Jun 2022 10:47:26 +0800 Subject: [PATCH] feat: extension detail support web preview --- .../extension/detail/extension-detail.component.html | 12 +++++++----- .../extension/detail/extension-detail.component.ts | 2 +- .../src/app/pages/extension/extension.component.html | 4 ++-- .../src/app/pages/extension/extension.service.ts | 7 +++++-- 4 files changed, 15 insertions(+), 10 deletions(-) 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 268a9817c..38f3f24f9 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 @@ -1,10 +1,12 @@
-
- - Back - +
+ +
-
--> -
+
@@ -15,7 +15,7 @@
- + diff --git a/src/workbench/browser/src/app/pages/extension/extension.service.ts b/src/workbench/browser/src/app/pages/extension/extension.service.ts index 0b5fa8608..bb0ce6cb4 100644 --- a/src/workbench/browser/src/app/pages/extension/extension.service.ts +++ b/src/workbench/browser/src/app/pages/extension/extension.service.ts @@ -1,10 +1,13 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; +import { isElectron } from 'eo/shared/common/common'; import { lastValueFrom } from 'rxjs'; import { ModuleInfo } from '../../utils/module-loader'; import { EoExtensionInfo } from './extension.model'; -const HOST = 'http://106.12.149.147'; +const HOST = isElectron() + ? 'http://106.12.149.147' + : 'https://mockapi.eolink.com/ztBFKai20ee60c12871881565b5a6ddd718337df0e30979'; @Injectable() export class ExtensionService { ignoreList = ['default']; @@ -14,7 +17,7 @@ export class ExtensionService { this.getInstalledList(); } getInstalledList() { - this.localModules = window.eo?.getModules()||new Map(); + this.localModules = window.eo?.getModules() || new Map(); this.updateExtensionIDs(); } public async requestList() {