Commit 7c08b643 authored by dev0tion's avatar dev0tion

Enable Stratis wallet section

parent d9cf0208
<!-- SIDEBAR --> <!-- sidebar -->
<aside id="sidebar"> <aside id="sidebar">
<!-- menu-->
<ul class="list-unstyled menu"> <ul class="list-unstyled menu">
<li class="active"> <li class="active" (click)="loadBitcoinWallet()">
<!--<a href="#">--><img src="../../../assets/images/ico_bitcoin.svg" alt="Bitcoin"><!--</a>--> <img src="../../../assets/images/ico_bitcoin.svg" alt="Bitcoin">
<span class="bar"></span> <span class="bar"></span>
</li> </li>
<!--<li> <li (click)="loadStratisWallet()">
<a href="#"><img src="../../../assets/images/ico_stratis.svg" alt="Stratis"></a> <img src="../../../assets/images/ico_stratis.svg" alt="Stratis">
<span class="bar"></span> <span class="bar"></span>
</li>--> </li>
</ul> </ul>
<!-- /menu--> <!-- /menu-->
<ul class="list-unstyled second"> <ul class="list-unstyled second">
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { LogoutConfirmationComponent } from '../logout-confirmation/logout-confirmation.component'; import { LogoutConfirmationComponent } from '../logout-confirmation/logout-confirmation.component';
import { Router } from '@angular/router';
import { GlobalService } from '../../shared/services/global.service';
@Component({ @Component({
selector: 'sidebar', selector: 'sidebar',
...@@ -9,13 +12,22 @@ import { LogoutConfirmationComponent } from '../logout-confirmation/logout-confi ...@@ -9,13 +12,22 @@ import { LogoutConfirmationComponent } from '../logout-confirmation/logout-confi
}) })
export class SidebarComponent implements OnInit { export class SidebarComponent implements OnInit {
constructor(private modalService: NgbModal) { } constructor(private globalService: GlobalService, private router: Router, private modalService: NgbModal) { }
ngOnInit() { ngOnInit() {
} }
private loadBitcoinWallet() {
this.globalService.setCoinName("Bitcoin");
this.router.navigate(['/wallet']);
}
private loadStratisWallet() {
this.globalService.setCoinName("Stratis");
this.router.navigate(['/wallet/stratis-wallet']);
}
private logOut() { private logOut() {
const modalRef = this.modalService.open(LogoutConfirmationComponent); const modalRef = this.modalService.open(LogoutConfirmationComponent);
} }
} }
...@@ -8,14 +8,20 @@ import { HistoryComponent } from './history/history.component'; ...@@ -8,14 +8,20 @@ import { HistoryComponent } from './history/history.component';
import { DashboardComponent } from './dashboard/dashboard.component'; import { DashboardComponent } from './dashboard/dashboard.component';
const routes: Routes = [ const routes: Routes = [
{ path: '', redirectTo: 'wallet', pathMatch: 'full' }, { path: '', component: WalletComponent,
{ path: 'wallet', component: WalletComponent,
children: [ children: [
{ path: '', redirectTo:'dashboard', pathMatch:'full' }, { path: '', redirectTo:'dashboard', pathMatch:'full' },
{ path: 'dashboard', component: DashboardComponent}, { path: 'dashboard', component: DashboardComponent},
{ path: 'history', component: HistoryComponent} { path: 'history', component: HistoryComponent}
] ]
}, },
{ path: 'stratis-wallet', component: WalletComponent,
children: [
{ path: '', redirectTo:'dashboard', pathMatch:'full' },
{ path: 'dashboard', component: DashboardComponent},
{ path: 'history', component: HistoryComponent}
]
}
]; ];
@NgModule({ @NgModule({
......
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