aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-library/my-library-routing.module.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-12 15:28:54 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-13 12:02:21 +0100
commit17119e4a546522468878cf115558b17949ab50d0 (patch)
tree3f130cfd7fdccf5aeeac9beee941750590239047 /client/src/app/+my-library/my-library-routing.module.ts
parentb4bc269e5517849b5b89052f0c1a2c01b6f65089 (diff)
downloadPeerTube-17119e4a546522468878cf115558b17949ab50d0.tar.gz
PeerTube-17119e4a546522468878cf115558b17949ab50d0.tar.zst
PeerTube-17119e4a546522468878cf115558b17949ab50d0.zip
Reorganize left menu and account menu
Add my-settings and my-library in left menu Move administration below my-library Split account menu: my-setting and my library
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.ts134
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 @@
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
3import { MetaGuard } from '@ngx-meta/core'
4import { LoginGuard } from '../core'
5import { MyHistoryComponent } from './my-history/my-history.component'
6import { MyLibraryComponent } from './my-library.component'
7import { MyOwnershipComponent } from './my-ownership/my-ownership.component'
8import { MySubscriptionsComponent } from './my-subscriptions/my-subscriptions.component'
9import { MyVideoImportsComponent } from './my-video-imports/my-video-imports.component'
10import { MyVideoPlaylistCreateComponent } from './my-video-playlists/my-video-playlist-create.component'
11import { MyVideoPlaylistElementsComponent } from './my-video-playlists/my-video-playlist-elements.component'
12import { MyVideoPlaylistUpdateComponent } from './my-video-playlists/my-video-playlist-update.component'
13import { MyVideoPlaylistsComponent } from './my-video-playlists/my-video-playlists.component'
14import { MyVideosComponent } from './my-videos/my-videos.component'
15
16const 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})
134export class MyLibraryRoutingModule {}