Skip to content

Commit

Permalink
fix: env modal auto open while page load
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Jun 28, 2022
1 parent 1093438 commit 979b4c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/workbench/browser/src/app/pages/api/api.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<nz-sider nzTheme="light" nzWidth="250">
<!-- <div class="side-container"> -->
<nz-content>
<nz-tabset nzCentered>
<nz-tabset nzCentered [nzAnimated]="false">
<nz-tab [nzTitle]="apiTitle">
<ng-template #apiTitle>
<iconpark-icon name="folder-open"></iconpark-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,9 @@ export class EnvComponent implements OnInit, OnDestroy {
return new Promise((resolve) => {
this.storage.run('environmentLoadAllByProjectID', [projectID], async (result: StorageRes) => {
if (result.status === StorageResStatus.success) {
this.envList = result.data || [];
if (!this.envList.length) {
await this.handleAddEnv(projectID);
resolve(true);
return;
}
// await this.handleSwitchEnv(uuid ?? result.data[0].uuid);
resolve(true);
return resolve(result.data || []);
}
return resolve([]);
});
});
}
Expand Down Expand Up @@ -162,6 +156,7 @@ export class EnvComponent implements OnInit, OnDestroy {

handleShowModal() {
// this.handleAddEnv(null);
console.log('==>>', new Error());
this.isVisible = true;
this.isOpen = false;
// this.getAllEnv(this.envUuid);
Expand Down

0 comments on commit 979b4c2

Please sign in to comment.