Skip to content

Commit

Permalink
feat: extension detail support web preview
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Jun 23, 2022
1 parent c3f2d43 commit 899e578
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<div class="py-3 extension-detail">
<div class="py-4">
<a nz-button nzType="link" (click)="backToList()">
<i nz-icon nzType="left" nzTheme="outline"></i>Back
</a>
<div class="sticky top-0 bg-white z-50">
<div class="py-4 ">
<a nz-button nzType="link" (click)="backToList()">
<i nz-icon nzType="left" nzTheme="outline"></i>Back
</a>
</div>
<div class="bbd"></div>
</div>
<div class="bbd"></div>
<section class="h-full p-4 max-w-[80vw] mx-auto">
<div class="flex">
<i class="block w-24 h-24 mr-8 bg-center bg-no-repeat bg-cover border rounded-lg bd_all"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class ExtensionDetailComponent implements OnInit {
this.route.snapshot.queryParams.id,
this.route.snapshot.queryParams.name
);
console.log(' this.extensionDetail', this.extensionDetail);
console.log(' this.extensionDetail', JSON.stringify(this.extensionDetail));
}
manageExtension(operate: string, id) {
this.isOperating = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- <input type="text" nz-input [(ngModel)]="keyword" (ngModelChange)="onSeachChange($event)" placeholder="search" /> -->
<input type="text" class="flex-1 w-full px-3 input" placeholder="search" [(ngModel)]="keyword" />
<!-- Fixed Group -->
<div class="group_container fixed_group_tree pt10" *ngIf="electron.isElectron">
<div class="group_container fixed_group_tree pt10">
<nz-tree [nzData]="fixedTreeNode" [nzSelectedKeys]="nzSelectedKeys" nzBlockNode (nzClick)="clickTreeItem($event)"
[nzTreeTemplate]="nzFixedTreeTemplate"></nz-tree>
<ng-template #nzFixedTreeTemplate let-node let-origin="origin">
Expand All @@ -15,7 +15,7 @@
</div>
</ng-template>
</div>
<nz-divider *ngIf="electron.isElectron" class="!mt-[1px] !mb-[4px]"></nz-divider>
<nz-divider class="!mt-[1px] !mb-[4px]"></nz-divider>
<nz-tree [nzData]="treeNodes" [nzSelectedKeys]="nzSelectedKeys" #apiGroup [nzHideUnMatched]="true"
(nzClick)="clickTreeItem($event)" nzBlockNode [nzTreeTemplate]="nzTreeTemplate"></nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
Expand Down
Original file line number Diff line number Diff line change
@@ -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'];
Expand All @@ -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() {
Expand Down

0 comments on commit 899e578

Please sign in to comment.