PeerTube/client/src/app/+my-account/my-account-routing.module.ts

87 lines
2.5 KiB
TypeScript
Raw Normal View History

import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
2017-07-06 17:43:58 +02:00
import { MetaGuard } from '@ngx-meta/core'
import { LoginGuard } from '../core'
2018-04-23 16:16:05 +02:00
import { MyAccountComponent } from './my-account.component'
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
2018-05-09 09:26:41 +02:00
import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component'
import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component'
import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component'
2018-08-02 17:48:50 +02:00
import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component'
2016-11-20 17:18:15 +01:00
2018-04-23 16:16:05 +02:00
const myAccountRoutes: Routes = [
2016-11-20 17:18:15 +01:00
{
2018-05-09 09:26:41 +02:00
path: '',
2018-04-23 16:16:05 +02:00
component: MyAccountComponent,
2017-12-01 17:38:26 +01:00
canActivateChild: [ MetaGuard, LoginGuard ],
children: [
{
path: '',
redirectTo: 'settings',
pathMatch: 'full'
},
2017-12-01 17:38:26 +01:00
{
path: 'settings',
2018-04-23 16:16:05 +02:00
component: MyAccountSettingsComponent,
2017-12-01 17:38:26 +01:00
data: {
meta: {
title: 'Account settings'
}
}
},
2018-04-26 16:11:38 +02:00
{
path: 'video-channels',
component: MyAccountVideoChannelsComponent,
data: {
meta: {
title: 'Account video channels'
}
}
},
{
path: 'video-channels/create',
component: MyAccountVideoChannelCreateComponent,
data: {
meta: {
title: 'Create new video channel'
}
}
},
{
path: 'video-channels/update/:videoChannelId',
component: MyAccountVideoChannelUpdateComponent,
data: {
meta: {
title: 'Update video channel'
}
}
},
2017-12-01 18:56:26 +01:00
{
path: 'videos',
2018-04-23 16:16:05 +02:00
component: MyAccountVideosComponent,
2017-12-01 18:56:26 +01:00
data: {
meta: {
title: 'Account videos'
}
}
2018-08-02 17:48:50 +02:00
},
{
path: 'video-imports',
component: MyAccountVideoImportsComponent,
data: {
meta: {
title: 'Account video imports'
}
}
2017-12-01 18:56:26 +01:00
}
2017-12-01 17:38:26 +01:00
]
2016-11-20 17:18:15 +01:00
}
]
2016-11-20 17:18:15 +01:00
@NgModule({
2018-04-23 16:16:05 +02:00
imports: [ RouterModule.forChild(myAccountRoutes) ],
2016-11-20 17:18:15 +01:00
exports: [ RouterModule ]
})
2018-04-23 16:16:05 +02:00
export class MyAccountRoutingModule {}