mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-09 03:24:13 +00:00
Option to minimize added
This commit is contained in:
parent
9e2bc25c01
commit
c23892f836
@ -40,14 +40,20 @@
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
<button *ngIf="!isMinimized" style="color:white" mat-icon-button (click)="minimize(true)">
|
||||
<mat-icon>remove</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isMinimized" style="color:white" mat-icon-button (click)="minimize(false)">
|
||||
<mat-icon>remove</mat-icon>
|
||||
</button>
|
||||
<button style="color:white" mat-icon-button (click)="close()">
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<app-log-console [hidden]="!(selected.value===0)" [server]="server" [project]="project"></app-log-console>
|
||||
<app-log-console [hidden]="!(selected.value===0) || isMinimized" [server]="server" [project]="project"></app-log-console>
|
||||
|
||||
<div *ngFor="let node of nodes; let index = index">
|
||||
<div [hidden]="isMinimized" *ngFor="let node of nodes; let index = index">
|
||||
<app-web-console [hidden]="!(selected.value===(index+1))" [server]="server" [node]="nodes[index]"></app-web-console>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -28,6 +28,8 @@ export class ConsoleWrapperComponent implements OnInit {
|
||||
public isDraggingEnabled: boolean = false;
|
||||
public isLightThemeEnabled: boolean = false;
|
||||
|
||||
public isMinimized: boolean = false;
|
||||
|
||||
constructor(
|
||||
private consoleService: NodeConsoleService,
|
||||
private themeService: ThemeService
|
||||
@ -38,7 +40,7 @@ export class ConsoleWrapperComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.themeService.getActualTheme() === 'light' ? this.isLightThemeEnabled = true : this.isLightThemeEnabled = false;
|
||||
this.style = { bottom: '20px', left: '20px', width: '720px', height: '456px'};
|
||||
this.style = { bottom: '20px', left: '20px', width: '720px', height: '460px'};
|
||||
|
||||
this.consoleService.nodeConsoleTrigger.subscribe((node) => {
|
||||
this.addTab(node, true);
|
||||
@ -50,7 +52,17 @@ export class ConsoleWrapperComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
minimize(value: boolean) {
|
||||
this.isMinimized = value;
|
||||
if (!value) {
|
||||
this.style = { bottom: '20px', left: '20px', width: '720px', height: '460px'};
|
||||
} else {
|
||||
this.style = { bottom: '20px', left: '20px', width: '720px', height: '56px'};
|
||||
}
|
||||
}
|
||||
|
||||
addTab(node: Node, selectAfterAdding: boolean) {
|
||||
this.minimize(false);
|
||||
this.nodes.push(node);
|
||||
|
||||
if (selectAfterAdding) {
|
||||
@ -99,7 +111,7 @@ export class ConsoleWrapperComponent implements OnInit {
|
||||
event.rectangle.width &&
|
||||
event.rectangle.height &&
|
||||
(event.rectangle.width < 720 ||
|
||||
event.rectangle.height < 456)
|
||||
event.rectangle.height < 460)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user