-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
105 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
src/workbench/browser/src/app/pages/api/overview/api-overview.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
.overview_container{ | ||
width: 50%; | ||
width: 70%; | ||
margin: 0 auto; | ||
padding: 20px 0; | ||
} | ||
nz-card{ | ||
min-width: 220px; | ||
.card_container{ | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, 250px); | ||
grid-column-gap: 20px; | ||
grid-row-gap: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
<eo-navbar></eo-navbar> | ||
<div class="home_container f_row"> | ||
<eo-sidebar></eo-sidebar> | ||
<iframe src="http://localhost:8080" style="width: 100vw;"></iframe> | ||
<div class="home fg1"> | ||
<router-outlet></router-outlet> | ||
<iframe | ||
*ngIf="!this.sidebar.currentModule.isOffical" | ||
src="http://localhost:8080" | ||
id="app" | ||
frameborder="no" | ||
border="0" | ||
style="width: calc(100vw - 90px);height: calc(100vh - var(--NAVBAR_HEIGHT) - 4px);" | ||
></iframe> | ||
<router-outlet *ngIf="this.sidebar.currentModule.isOffical"></router-outlet> | ||
</div> | ||
</div> | ||
<!-- <eo-toolbar></eo-toolbar> --> | ||
<eo-toolbar></eo-toolbar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { SidebarService } from '../shared/components/sidebar/sidebar.service'; | ||
|
||
@Component({ | ||
selector: 'eo-pages', | ||
templateUrl: './pages.component.html', | ||
styleUrls: ['./pages.component.scss'] | ||
styleUrls: ['./pages.component.scss'], | ||
}) | ||
export class PagesComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
constructor(private sidebar: SidebarService) {} | ||
ngOnInit(): void { | ||
this.watchSidebarItemChange(); | ||
} | ||
private watchSidebarItemChange() { | ||
this.sidebar.appChanged$.pipe().subscribe(() => { | ||
console.log(this.sidebar.currentModule); | ||
}); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
|
||
import { CommonModule } from '@angular/common'; | ||
import { PagesRoutingModule } from './pages-routing.module'; | ||
|
||
import { PagesComponent } from './pages.component'; | ||
import { SharedModule } from '../shared/shared.module'; | ||
|
||
@NgModule({ | ||
declarations: [PagesComponent], | ||
imports: [PagesRoutingModule, FormsModule, SharedModule], | ||
exports: [] | ||
imports: [PagesRoutingModule, CommonModule, SharedModule], | ||
exports: [], | ||
}) | ||
export class PagesModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/workbench/browser/src/app/shared/components/sidebar/sidebar.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/workbench/browser/src/app/shared/components/sidebar/sidebar.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Sidebar offical module | ||
*/ | ||
export interface SidebarModuleInfo { | ||
// app | ||
name: string; | ||
//icon or logo image | ||
logo:string; | ||
// 模块ID,用于关联 | ||
moduleID: string; | ||
// 模块名称,用于显示 | ||
moduleName: string; | ||
//is offcial app | ||
isOffical: boolean; | ||
// module route | ||
route: string; | ||
// route active when match string | ||
activeRoute: string; | ||
} |
12 changes: 8 additions & 4 deletions
12
src/workbench/browser/src/app/shared/components/sidebar/sidebar.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Subject } from 'rxjs'; | ||
import { ModuleInfo } from '../../../utils/module-loader'; | ||
import { SidebarModuleInfo } from './sidebar.model'; | ||
|
||
@Injectable({ | ||
providedIn: 'root', | ||
}) | ||
export class SidebarService { | ||
collapsed = true; | ||
private collapsedChange$ = new Subject(); | ||
currentModule: ModuleInfo | SidebarModuleInfo | any; | ||
private collapsedChanged$: Subject<boolean> = new Subject(); | ||
public appChanged$: Subject<void> = new Subject(); | ||
constructor() {} | ||
getCollapsed() { | ||
return this.collapsed; | ||
} | ||
toggleCollapsed() { | ||
this.collapsed = !this.collapsed; | ||
this.collapsedChange$.next(this.collapsed); | ||
this.collapsedChanged$.next(this.collapsed); | ||
} | ||
onCollapsedChange = function() { | ||
return this.collapsedChange$.pipe(); | ||
onCollapsedChanged = function () { | ||
return this.collapsedChanged$.pipe(); | ||
}; | ||
} |
Oops, something went wrong.