]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+my-account/my-account-routing.module.ts
Add AccountAvatarComponent (#3965)
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-routing.module.ts
CommitLineData
df98563e
C
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
8b13c289 3import { MetaGuard } from '@ngx-meta/core'
f47bf2e1 4import { LoginGuard } from '../core'
17119e4a 5import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component'
67ed6552
C
6import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component'
7import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component'
67ed6552 8import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component'
4bb6886d 9import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
67ed6552 10import { MyAccountComponent } from './my-account.component'
afff310e 11import { MyAccountApplicationsComponent } from './my-account-applications/my-account-applications.component'
693b1aba 12
4bb6886d 13const myAccountRoutes: Routes = [
693b1aba 14 {
62e62f11 15 path: '',
4bb6886d 16 component: MyAccountComponent,
c30745f3
C
17 canActivateChild: [ MetaGuard, LoginGuard ],
18 children: [
379acb21
C
19 {
20 path: '',
21 redirectTo: 'settings',
22 pathMatch: 'full'
23 },
c30745f3
C
24 {
25 path: 'settings',
4bb6886d 26 component: MyAccountSettingsComponent,
c30745f3
C
27 data: {
28 meta: {
f29f487e 29 title: $localize`Account settings`
c30745f3
C
30 }
31 }
32 },
830b4faf 33
08c1efbe
C
34 {
35 path: 'video-channels',
17119e4a
C
36 redirectTo: '/my-library/video-channels',
37 pathMatch: 'full'
08c1efbe 38 },
830b4faf
C
39
40 {
41 path: 'video-playlists',
17119e4a
C
42 redirectTo: '/my-library/video-playlists',
43 pathMatch: 'full'
830b4faf 44 },
f0a39880 45 {
bce47964 46 path: 'video-playlists/create',
17119e4a
C
47 redirectTo: '/my-library/video-playlists/create',
48 pathMatch: 'full'
f0a39880 49 },
830b4faf 50 {
bce47964 51 path: 'video-playlists/:videoPlaylistId',
17119e4a
C
52 redirectTo: '/my-library/video-playlists/:videoPlaylistId',
53 pathMatch: 'full'
830b4faf
C
54 },
55 {
56 path: 'video-playlists/update/:videoPlaylistId',
17119e4a
C
57 redirectTo: '/my-library/video-playlists/update/:videoPlaylistId',
58 pathMatch: 'full'
830b4faf
C
59 },
60
202f6b6c
C
61 {
62 path: 'videos',
17119e4a
C
63 redirectTo: '/my-library/videos',
64 pathMatch: 'full'
ed31c059
C
65 },
66 {
67 path: 'video-imports',
17119e4a
C
68 redirectTo: '/my-library/video-imports',
69 pathMatch: 'full'
22a16e36
C
70 },
71 {
72 path: 'subscriptions',
17119e4a
C
73 redirectTo: '/my-library/subscriptions',
74 pathMatch: 'full'
74d63469
GR
75 },
76 {
77 path: 'ownership',
17119e4a
C
78 redirectTo: '/my-library/ownership',
79 pathMatch: 'full'
af5767ff
C
80 },
81 {
82 path: 'blocklist/accounts',
83 component: MyAccountBlocklistComponent,
84 data: {
85 meta: {
f29f487e 86 title: $localize`Muted accounts`
af5767ff
C
87 }
88 }
89 },
90 {
91 path: 'blocklist/servers',
92 component: MyAccountServerBlocklistComponent,
93 data: {
94 meta: {
f29f487e 95 title: $localize`Muted servers`
af5767ff
C
96 }
97 }
80bfd33c
C
98 },
99 {
100 path: 'history/videos',
17119e4a
C
101 redirectTo: '/my-library/history/videos',
102 pathMatch: 'full'
2f1548fd
C
103 },
104 {
105 path: 'notifications',
106 component: MyAccountNotificationsComponent,
107 data: {
108 meta: {
f29f487e 109 title: $localize`Notifications`
2f1548fd
C
110 }
111 }
94148c90
C
112 },
113 {
114 path: 'abuses',
115 component: MyAccountAbusesListComponent,
116 data: {
117 meta: {
f29f487e 118 title: $localize`My abuse reports`
94148c90
C
119 }
120 }
afff310e
RK
121 },
122 {
123 path: 'applications',
124 component: MyAccountApplicationsComponent,
125 data: {
126 meta: {
19b7ebfa 127 title: $localize`Applications`
afff310e
RK
128 }
129 }
202f6b6c 130 }
c30745f3 131 ]
693b1aba 132 }
df98563e 133]
693b1aba
C
134
135@NgModule({
4bb6886d 136 imports: [ RouterModule.forChild(myAccountRoutes) ],
693b1aba
C
137 exports: [ RouterModule ]
138})
4bb6886d 139export class MyAccountRoutingModule {}