]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+my-account/my-account-routing.module.ts
Implement two factor in client
[github/Chocobozzz/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 { LoginGuard } from '../core'
4 import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component'
5 import { MyAccountApplicationsComponent } from './my-account-applications/my-account-applications.component'
6 import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component'
7 import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component'
8 import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component'
9 import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
10 import { MyAccountTwoFactorComponent } from './my-account-settings/my-account-two-factor'
11 import { MyAccountComponent } from './my-account.component'
12
13 const myAccountRoutes: Routes = [
14 {
15 path: '',
16 component: MyAccountComponent,
17 canActivateChild: [ LoginGuard ],
18 children: [
19 {
20 path: '',
21 redirectTo: 'settings',
22 pathMatch: 'full'
23 },
24 {
25 path: 'settings',
26 component: MyAccountSettingsComponent,
27 data: {
28 meta: {
29 title: $localize`Account settings`
30 }
31 }
32 },
33
34 {
35 path: 'two-factor-auth',
36 component: MyAccountTwoFactorComponent,
37 data: {
38 meta: {
39 title: $localize`Two factor authentication`
40 }
41 }
42 },
43
44 {
45 path: 'video-channels',
46 redirectTo: '/my-library/video-channels',
47 pathMatch: 'full'
48 },
49
50 {
51 path: 'video-playlists',
52 redirectTo: '/my-library/video-playlists',
53 pathMatch: 'full'
54 },
55 {
56 path: 'video-playlists/create',
57 redirectTo: '/my-library/video-playlists/create',
58 pathMatch: 'full'
59 },
60 {
61 path: 'video-playlists/:videoPlaylistId',
62 redirectTo: '/my-library/video-playlists/:videoPlaylistId',
63 pathMatch: 'full'
64 },
65 {
66 path: 'video-playlists/update/:videoPlaylistId',
67 redirectTo: '/my-library/video-playlists/update/:videoPlaylistId',
68 pathMatch: 'full'
69 },
70
71 {
72 path: 'videos',
73 redirectTo: '/my-library/videos',
74 pathMatch: 'full'
75 },
76 {
77 path: 'video-imports',
78 redirectTo: '/my-library/video-imports',
79 pathMatch: 'full'
80 },
81 {
82 path: 'subscriptions',
83 redirectTo: '/my-library/subscriptions',
84 pathMatch: 'full'
85 },
86 {
87 path: 'ownership',
88 redirectTo: '/my-library/ownership',
89 pathMatch: 'full'
90 },
91 {
92 path: 'blocklist/accounts',
93 component: MyAccountBlocklistComponent,
94 data: {
95 meta: {
96 title: $localize`Muted accounts`
97 }
98 }
99 },
100 {
101 path: 'blocklist/servers',
102 component: MyAccountServerBlocklistComponent,
103 data: {
104 meta: {
105 title: $localize`Muted servers`
106 }
107 }
108 },
109 {
110 path: 'history/videos',
111 redirectTo: '/my-library/history/videos',
112 pathMatch: 'full'
113 },
114 {
115 path: 'notifications',
116 component: MyAccountNotificationsComponent,
117 data: {
118 meta: {
119 title: $localize`Notifications`
120 }
121 }
122 },
123 {
124 path: 'abuses',
125 component: MyAccountAbusesListComponent,
126 data: {
127 meta: {
128 title: $localize`My abuse reports`
129 }
130 }
131 },
132 {
133 path: 'applications',
134 component: MyAccountApplicationsComponent,
135 data: {
136 meta: {
137 title: $localize`Applications`
138 }
139 }
140 }
141 ]
142 }
143 ]
144
145 @NgModule({
146 imports: [ RouterModule.forChild(myAccountRoutes) ],
147 exports: [ RouterModule ]
148 })
149 export class MyAccountRoutingModule {}