From f3f2452adb2723f2dde0b3429c282b835b5cdfcf Mon Sep 17 00:00:00 2001
From: CeĢsar Calvo <ccalvo@curisit.net>
Date: Tue, 14 Mar 2017 14:41:35 +0000
Subject: [PATCH] #3527 - Main menu
---
securis/src/main/webapp/src/app/home.component.ts | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/securis/src/main/webapp/src/app/app.component.ts b/securis/src/main/webapp/src/app/home.component.ts
similarity index 83%
rename from securis/src/main/webapp/src/app/app.component.ts
rename to securis/src/main/webapp/src/app/home.component.ts
index c791107..a2cbc86 100644
--- a/securis/src/main/webapp/src/app/app.component.ts
+++ b/securis/src/main/webapp/src/app/home.component.ts
@@ -1,23 +1,29 @@
import { Observable } from 'rxjs/Observable';
import { BaseRequestOptions, Http } from '@angular/http';
import { ToastsManager } from 'ng2-toastr/ng2-toastr';
-import { AfterViewInit, Component, ViewContainerRef } from '@angular/core';
+import { AfterViewInit, Component, ViewContainerRef, ViewChild } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { MdIconRegistry } from '@angular/material';
import { UserService } from './user.service';
import { LocalStorageService } from 'angular-2-local-storage';
import { TdMediaService } from '@covalent/core';
import { Router } from '@angular/router';
+import { TdNavigationDrawerComponent } from '@covalent/core'
// https://github.com/Teradata/covalent-quickstart/tree/develop/src/app
// https://teradata.github.io/covalent-quickstart/#/
@Component({
selector: 'app-home',
- templateUrl: 'src/app/app.home.html'
+ templateUrl: 'src/app/home.component.html'
})
-export class AppHomeComponent implements AfterViewInit {
+export class HomeComponent implements AfterViewInit {
+
+ @ViewChild('varName') child: TdNavigationDrawerComponent;
+
securisVersion : string;
+ showMenu : boolean = false;
+
constructor(private userService: UserService,
toaster: ToastsManager,
vRef: ViewContainerRef,
@@ -49,9 +55,16 @@
this._domSanitizer.bypassSecurityTrustResourceUrl('assets/securis_logo_black.svg'));
}
+
+ public clicked() {
+ //this.child.open();
+ }
+
ngAfterViewInit(): void {
+ // this.showMenu = true;
this.media.broadcast();
this.userService.isLoggedIn().subscribe(authOk => {
+ //this.showMenu = authOk.valueOf();
this.router.navigateByUrl(authOk ? 'packs' : 'login');
},
err => /* Show message */ this.router.navigateByUrl('login'));
--
Gitblit v1.3.2