2023-11-09 08:22:53 +00:00
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
import { MasterPageComponent } from './components/master-page/master-page.component';
|
|
|
|
import { SharedModule } from './shared/shared.module';
|
|
|
|
|
|
|
|
import { StartComponent } from './components/start/start.component';
|
|
|
|
import { AddressComponent } from './components/address/address.component';
|
|
|
|
import { PushTransactionComponent } from './components/push-transaction/push-transaction.component';
|
2023-11-22 18:13:41 +09:00
|
|
|
import { CalculatorComponent } from './components/calculator/calculator.component';
|
2023-11-09 08:22:53 +00:00
|
|
|
import { BlocksList } from './components/blocks-list/blocks-list.component';
|
|
|
|
import { RbfList } from './components/rbf-list/rbf-list.component';
|
|
|
|
|
|
|
|
const browserWindow = window || {};
|
|
|
|
// @ts-ignore
|
|
|
|
const browserWindowEnv = browserWindow.__env || {};
|
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{
|
2023-11-10 03:03:16 +00:00
|
|
|
path: '',
|
2023-11-09 08:22:53 +00:00
|
|
|
component: MasterPageComponent,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'mining/blocks',
|
|
|
|
redirectTo: 'blocks',
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'tx/push',
|
|
|
|
component: PushTransactionComponent,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'about',
|
|
|
|
loadChildren: () => import('./components/about/about.module').then(m => m.AboutModule),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'blocks',
|
|
|
|
component: BlocksList,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'rbf',
|
|
|
|
component: RbfList,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'terms-of-service',
|
|
|
|
loadChildren: () => import('./components/terms-of-service/terms-of-service.module').then(m => m.TermsOfServiceModule),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'privacy-policy',
|
|
|
|
loadChildren: () => import('./components/privacy-policy/privacy-policy.module').then(m => m.PrivacyPolicyModule),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'trademark-policy',
|
|
|
|
loadChildren: () => import('./components/trademark-policy/trademark-policy.module').then(m => m.TrademarkModule),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'address/:id',
|
|
|
|
children: [],
|
|
|
|
component: AddressComponent,
|
|
|
|
data: {
|
|
|
|
ogImage: true,
|
|
|
|
networkSpecific: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'tx',
|
|
|
|
component: StartComponent,
|
|
|
|
data: { preload: true, networkSpecific: true },
|
|
|
|
loadChildren: () => import('./components/transaction/transaction.module').then(m => m.TransactionModule),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'block',
|
|
|
|
component: StartComponent,
|
|
|
|
data: { preload: true, networkSpecific: true },
|
|
|
|
loadChildren: () => import('./components/block/block.module').then(m => m.BlockModule),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'docs',
|
|
|
|
loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule),
|
|
|
|
data: { preload: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'api',
|
|
|
|
loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'lightning',
|
|
|
|
loadChildren: () => import('./lightning/lightning.module').then(m => m.LightningModule),
|
|
|
|
data: { preload: browserWindowEnv && browserWindowEnv.LIGHTNING === true, networks: ['bitcoin'] },
|
|
|
|
},
|
2023-11-22 18:13:41 +09:00
|
|
|
{
|
|
|
|
path: 'tools/calculator',
|
|
|
|
component: CalculatorComponent
|
|
|
|
},
|
2023-11-09 08:22:53 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
RouterModule.forChild(routes)
|
|
|
|
],
|
|
|
|
exports: [
|
|
|
|
RouterModule
|
|
|
|
]
|
|
|
|
})
|
|
|
|
export class MasterPageRoutingModule { }
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
CommonModule,
|
|
|
|
MasterPageRoutingModule,
|
|
|
|
SharedModule,
|
|
|
|
],
|
|
|
|
declarations: [
|
|
|
|
MasterPageComponent,
|
2023-11-14 15:53:37 +09:00
|
|
|
],
|
|
|
|
exports: [
|
|
|
|
MasterPageComponent,
|
2023-11-09 08:22:53 +00:00
|
|
|
]
|
|
|
|
})
|
|
|
|
export class MasterPageModule { }
|