You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/src/app/clightning/cl.routing.ts

43 lines
2.4 KiB
TypeScript

import { Routes, RouterModule } from '@angular/router';
import { ModuleWithProviders } from '@angular/core';
import { CLRootComponent } from './cl-root.component';
import { CLHomeComponent } from './home/home.component';
5 years ago
import { CLChannelsComponent } from './channels/channels.component';
import { CLInvoicesComponent } from './invoices/invoices.component';
import { CLLookupsComponent } from './lookups/lookups.component';
import { CLOnChainComponent } from './on-chain/on-chain.component';
import { CLQueryRoutesComponent } from './payments/query-routes/query-routes.component';
import { CLPaymentsComponent } from './payments/send-receive/payments.component';
import { CLPeersComponent } from './peers/peers.component';
import { CLForwardingHistoryComponent } from './forwarding-history/forwarding-history.component';
import { CLUnlockedGuard } from '../shared/services/auth.guard';
import { NotFoundComponent } from '../shared/components/not-found/not-found.component';
export const ClRoutes: Routes = [
{ path: '', component: CLRootComponent,
children: [
{ path: 'home', component: CLHomeComponent, canActivate: [CLUnlockedGuard] },
5 years ago
{ path: 'peers', component: CLPeersComponent, canActivate: [CLUnlockedGuard] },
{ path: 'chnlmanage', component: CLChannelsComponent, canActivate: [CLUnlockedGuard] },
{ path: 'onchain', component: CLOnChainComponent, canActivate: [CLUnlockedGuard] },
{ path: 'paymentsend', component: CLPaymentsComponent, canActivate: [CLUnlockedGuard] },
{ path: 'queryroutes', component: CLQueryRoutesComponent, canActivate: [CLUnlockedGuard] },
{ path: 'invoices', component: CLInvoicesComponent, canActivate: [CLUnlockedGuard] },
{ path: 'forwardinghistory', component: CLForwardingHistoryComponent, canActivate: [CLUnlockedGuard] },
5 years ago
{ path: 'lookups', component: CLLookupsComponent, canActivate: [CLUnlockedGuard] },
{ path: 'wallet', redirectTo: 'home' },
{ path: 'chnlclosed', redirectTo: 'chnlmanage' },
{ path: 'chnlpending', redirectTo: 'chnlmanage' },
{ path: 'chnlbackup', redirectTo: 'chnlmanage' },
{ path: 'transsendreceive', redirectTo: 'onchain' },
{ path: 'translist', redirectTo: 'onchain' },
{ path: 'switch', redirectTo: 'forwardinghistory' },
{ path: 'routingpeers', redirectTo: 'home' },
{ path: '**', component: NotFoundComponent }
]}
];
export const CLRouting: ModuleWithProviders = RouterModule.forChild(ClRoutes);