diff options
Diffstat (limited to 'client/src/app/+my-library/my-library-routing.module.ts')
-rw-r--r-- | client/src/app/+my-library/my-library-routing.module.ts | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/client/src/app/+my-library/my-library-routing.module.ts b/client/src/app/+my-library/my-library-routing.module.ts new file mode 100644 index 000000000..d8e5aa562 --- /dev/null +++ b/client/src/app/+my-library/my-library-routing.module.ts | |||
@@ -0,0 +1,134 @@ | |||
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 { MyHistoryComponent } from './my-history/my-history.component' | ||
6 | import { MyLibraryComponent } from './my-library.component' | ||
7 | import { MyOwnershipComponent } from './my-ownership/my-ownership.component' | ||
8 | import { MySubscriptionsComponent } from './my-subscriptions/my-subscriptions.component' | ||
9 | import { MyVideoImportsComponent } from './my-video-imports/my-video-imports.component' | ||
10 | import { MyVideoPlaylistCreateComponent } from './my-video-playlists/my-video-playlist-create.component' | ||
11 | import { MyVideoPlaylistElementsComponent } from './my-video-playlists/my-video-playlist-elements.component' | ||
12 | import { MyVideoPlaylistUpdateComponent } from './my-video-playlists/my-video-playlist-update.component' | ||
13 | import { MyVideoPlaylistsComponent } from './my-video-playlists/my-video-playlists.component' | ||
14 | import { MyVideosComponent } from './my-videos/my-videos.component' | ||
15 | |||
16 | const myLibraryRoutes: Routes = [ | ||
17 | { | ||
18 | path: '', | ||
19 | component: MyLibraryComponent, | ||
20 | canActivateChild: [ MetaGuard, LoginGuard ], | ||
21 | children: [ | ||
22 | { | ||
23 | path: '', | ||
24 | redirectTo: 'video-channels', | ||
25 | pathMatch: 'full' | ||
26 | }, | ||
27 | |||
28 | { | ||
29 | path: 'video-channels', | ||
30 | loadChildren: () => { | ||
31 | return import('./+my-video-channels/my-video-channels.module').then(m => m.MyVideoChannelsModule) | ||
32 | } | ||
33 | }, | ||
34 | |||
35 | { | ||
36 | path: 'video-playlists', | ||
37 | component: MyVideoPlaylistsComponent, | ||
38 | data: { | ||
39 | meta: { | ||
40 | title: $localize`My playlists` | ||
41 | } | ||
42 | } | ||
43 | }, | ||
44 | { | ||
45 | path: 'video-playlists/create', | ||
46 | component: MyVideoPlaylistCreateComponent, | ||
47 | data: { | ||
48 | meta: { | ||
49 | title: $localize`Create a new playlist` | ||
50 | } | ||
51 | } | ||
52 | }, | ||
53 | { | ||
54 | path: 'video-playlists/:videoPlaylistId', | ||
55 | component: MyVideoPlaylistElementsComponent, | ||
56 | data: { | ||
57 | meta: { | ||
58 | title: $localize`Playlist elements` | ||
59 | } | ||
60 | } | ||
61 | }, | ||
62 | { | ||
63 | path: 'video-playlists/update/:videoPlaylistId', | ||
64 | component: MyVideoPlaylistUpdateComponent, | ||
65 | data: { | ||
66 | meta: { | ||
67 | title: $localize`Update playlist` | ||
68 | } | ||
69 | } | ||
70 | }, | ||
71 | |||
72 | { | ||
73 | path: 'videos', | ||
74 | component: MyVideosComponent, | ||
75 | data: { | ||
76 | meta: { | ||
77 | title: $localize`My videos` | ||
78 | }, | ||
79 | reuse: { | ||
80 | enabled: true, | ||
81 | key: 'my-videos-list' | ||
82 | } | ||
83 | } | ||
84 | }, | ||
85 | { | ||
86 | path: 'video-imports', | ||
87 | component: MyVideoImportsComponent, | ||
88 | data: { | ||
89 | meta: { | ||
90 | title: $localize`My video imports` | ||
91 | } | ||
92 | } | ||
93 | }, | ||
94 | { | ||
95 | path: 'subscriptions', | ||
96 | component: MySubscriptionsComponent, | ||
97 | data: { | ||
98 | meta: { | ||
99 | title: $localize`My subscriptions` | ||
100 | } | ||
101 | } | ||
102 | }, | ||
103 | { | ||
104 | path: 'ownership', | ||
105 | component: MyOwnershipComponent, | ||
106 | data: { | ||
107 | meta: { | ||
108 | title: $localize`Ownership changes` | ||
109 | } | ||
110 | } | ||
111 | }, | ||
112 | |||
113 | { | ||
114 | path: 'history/videos', | ||
115 | component: MyHistoryComponent, | ||
116 | data: { | ||
117 | meta: { | ||
118 | title: $localize`My video history` | ||
119 | }, | ||
120 | reuse: { | ||
121 | enabled: true, | ||
122 | key: 'my-videos-history-list' | ||
123 | } | ||
124 | } | ||
125 | } | ||
126 | ] | ||
127 | } | ||
128 | ] | ||
129 | |||
130 | @NgModule({ | ||
131 | imports: [ RouterModule.forChild(myLibraryRoutes) ], | ||
132 | exports: [ RouterModule ] | ||
133 | }) | ||
134 | export class MyLibraryRoutingModule {} | ||