Commit 7c08b643 authored by dev0tion's avatar dev0tion

Enable Stratis wallet section

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