Add local user subscriptions
[oweals/peertube.git] / client / src / app / +my-account / my-account-routing.module.ts
1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3 import { MetaGuard } from '@ngx-meta/core'
4 import { LoginGuard } from '../core'
5 import { MyAccountComponent } from './my-account.component'
6 import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
7 import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
8 import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component'
9 import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component'
10 import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component'
11 import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component'
12 import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component'
13
14 const myAccountRoutes: Routes = [
15   {
16     path: '',
17     component: MyAccountComponent,
18     canActivateChild: [ MetaGuard, LoginGuard ],
19     children: [
20       {
21         path: '',
22         redirectTo: 'settings',
23         pathMatch: 'full'
24       },
25       {
26         path: 'settings',
27         component: MyAccountSettingsComponent,
28         data: {
29           meta: {
30             title: 'Account settings'
31           }
32         }
33       },
34       {
35         path: 'video-channels',
36         component: MyAccountVideoChannelsComponent,
37         data: {
38           meta: {
39             title: 'Account video channels'
40           }
41         }
42       },
43       {
44         path: 'video-channels/create',
45         component: MyAccountVideoChannelCreateComponent,
46         data: {
47           meta: {
48             title: 'Create new video channel'
49           }
50         }
51       },
52       {
53         path: 'video-channels/update/:videoChannelId',
54         component: MyAccountVideoChannelUpdateComponent,
55         data: {
56           meta: {
57             title: 'Update video channel'
58           }
59         }
60       },
61       {
62         path: 'videos',
63         component: MyAccountVideosComponent,
64         data: {
65           meta: {
66             title: 'Account videos'
67           }
68         }
69       },
70       {
71         path: 'video-imports',
72         component: MyAccountVideoImportsComponent,
73         data: {
74           meta: {
75             title: 'Account video imports'
76           }
77         }
78       },
79       {
80         path: 'subscriptions',
81         component: MyAccountSubscriptionsComponent,
82         data: {
83           meta: {
84             title: 'Account subscriptions'
85           }
86         }
87       }
88     ]
89   }
90 ]
91
92 @NgModule({
93   imports: [ RouterModule.forChild(myAccountRoutes) ],
94   exports: [ RouterModule ]
95 })
96 export class MyAccountRoutingModule {}