Commit f637f7eb authored by liuzheng712's avatar liuzheng712

feat: nav update

parent ce0a0546
......@@ -80,6 +80,7 @@
.dropdown-content li:hover {
background-color: #3a3333;
color: black;
width: 100%;
}
.dropdown-content li.disabled:hover {
......
......@@ -45,9 +45,33 @@ export class CleftbarComponent implements OnInit {
}
static Hide() {
DataStore.leftbarshow = false;
DataStore.Nav.map(function (value, i) {
for (var ii in value["children"]) {
if (DataStore.Nav[i]["children"][ii]["id"] === "HindLeftManager") {
DataStore.Nav[i]["children"][ii] = {
"id": "ShowLeftManager",
"click": "ShowLeft",
"name": "Show left manager"
}
}
}
})
}
static Show() {
DataStore.leftbarshow = true;
DataStore.Nav.map(function (value, i) {
for (var ii in value["children"]) {
if (DataStore.Nav[i]["children"][ii]["id"] === "ShowLeftManager") {
DataStore.Nav[i]["children"][ii] = {
"id": "HindLeftManager",
"click": "HideLeft",
"name": "Hind left manager"
}
}
}
})
}
constructor(private _appService: AppService,
......
......@@ -11,7 +11,6 @@ import {Component, OnInit} from '@angular/core';
import {NavList} from '../control.component'
import {SshComponent} from '../ssh/ssh.component'
import {RdpComponent} from '../rdp/rdp.component'
import {NavComponent} from "../../../BasicPage/nav/nav.component";
declare let jQuery: any;
......@@ -19,7 +18,7 @@ declare let jQuery: any;
@Component({
selector: 'app-controlnav',
templateUrl: './controlnav.component.html',
styleUrls: ['./controlnav.component.css']
styleUrls: ['./controlnav.component.css'],
})
export class ControlnavComponent implements OnInit {
setActive = ControlnavComponent.setActive;
......
<div class="container-fluid row">
<app-cleftbar class="col-md-2" ></app-cleftbar>
<app-control class="col-md-10" ></app-control>
<app-cleftbar class="col-md-2" *ngIf="DataStore.leftbarshow"></app-cleftbar>
<app-control [ngClass]="{'col-md-10':DataStore.leftbarshow,'col-md-12':!DataStore.leftbarshow}"></app-control>
</div>
......@@ -61,7 +61,7 @@ export let DataStore: {
error: {};
msg: {};
loglevel: number;
leftbarhide: boolean;
leftbarshow: boolean;
windowsize: Array<number>;
} = {
socket: io.connect(),
......@@ -70,7 +70,7 @@ export let DataStore: {
error: {},
msg: {},
loglevel: 0,
leftbarhide: false,
leftbarshow: true,
windowsize: [],
};
export let CSRF: string = '';
......@@ -264,7 +264,6 @@ export class AppService implements OnInit {
}
//
//
// HideLeft() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment