diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-12 15:28:54 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-13 12:02:21 +0100 |
commit | 17119e4a546522468878cf115558b17949ab50d0 (patch) | |
tree | 3f130cfd7fdccf5aeeac9beee941750590239047 /client/src/app/+my-account/my-account-routing.module.ts | |
parent | b4bc269e5517849b5b89052f0c1a2c01b6f65089 (diff) | |
download | PeerTube-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-account/my-account-routing.module.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-routing.module.ts | 97 |
1 files changed, 21 insertions, 76 deletions
diff --git a/client/src/app/+my-account/my-account-routing.module.ts b/client/src/app/+my-account/my-account-routing.module.ts index 0bcb38ef5..81380ec6e 100644 --- a/client/src/app/+my-account/my-account-routing.module.ts +++ b/client/src/app/+my-account/my-account-routing.module.ts | |||
@@ -2,21 +2,12 @@ import { NgModule } from '@angular/core' | |||
2 | import { RouterModule, Routes } from '@angular/router' | 2 | import { RouterModule, Routes } from '@angular/router' |
3 | import { MetaGuard } from '@ngx-meta/core' | 3 | import { MetaGuard } from '@ngx-meta/core' |
4 | import { LoginGuard } from '../core' | 4 | import { LoginGuard } from '../core' |
5 | import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' | ||
5 | import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component' | 6 | import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component' |
6 | import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component' | 7 | import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component' |
7 | import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component' | ||
8 | import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component' | 8 | import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component' |
9 | import { MyAccountOwnershipComponent } from './my-account-ownership/my-account-ownership.component' | ||
10 | import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component' | 9 | import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component' |
11 | import { MyAccountSubscriptionsComponent } from './my-account-subscriptions/my-account-subscriptions.component' | ||
12 | import { MyAccountVideoImportsComponent } from './my-account-video-imports/my-account-video-imports.component' | ||
13 | import { MyAccountVideoPlaylistCreateComponent } from './my-account-video-playlists/my-account-video-playlist-create.component' | ||
14 | import { MyAccountVideoPlaylistElementsComponent } from './my-account-video-playlists/my-account-video-playlist-elements.component' | ||
15 | import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playlists/my-account-video-playlist-update.component' | ||
16 | import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component' | ||
17 | import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' | ||
18 | import { MyAccountComponent } from './my-account.component' | 10 | import { MyAccountComponent } from './my-account.component' |
19 | import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' | ||
20 | 11 | ||
21 | const myAccountRoutes: Routes = [ | 12 | const myAccountRoutes: Routes = [ |
22 | { | 13 | { |
@@ -41,88 +32,50 @@ const myAccountRoutes: Routes = [ | |||
41 | 32 | ||
42 | { | 33 | { |
43 | path: 'video-channels', | 34 | path: 'video-channels', |
44 | loadChildren: () => { | 35 | redirectTo: '/my-library/video-channels', |
45 | return import('./+my-account-video-channels/my-account-video-channels.module') | 36 | pathMatch: 'full' |
46 | .then(m => m.MyAccountVideoChannelsModule) | ||
47 | } | ||
48 | }, | 37 | }, |
49 | 38 | ||
50 | { | 39 | { |
51 | path: 'video-playlists', | 40 | path: 'video-playlists', |
52 | component: MyAccountVideoPlaylistsComponent, | 41 | redirectTo: '/my-library/video-playlists', |
53 | data: { | 42 | pathMatch: 'full' |
54 | meta: { | ||
55 | title: $localize`Account playlists` | ||
56 | } | ||
57 | } | ||
58 | }, | 43 | }, |
59 | { | 44 | { |
60 | path: 'video-playlists/create', | 45 | path: 'video-playlists/create', |
61 | component: MyAccountVideoPlaylistCreateComponent, | 46 | redirectTo: '/my-library/video-playlists/create', |
62 | data: { | 47 | pathMatch: 'full' |
63 | meta: { | ||
64 | title: $localize`Create new playlist` | ||
65 | } | ||
66 | } | ||
67 | }, | 48 | }, |
68 | { | 49 | { |
69 | path: 'video-playlists/:videoPlaylistId', | 50 | path: 'video-playlists/:videoPlaylistId', |
70 | component: MyAccountVideoPlaylistElementsComponent, | 51 | redirectTo: '/my-library/video-playlists/:videoPlaylistId', |
71 | data: { | 52 | pathMatch: 'full' |
72 | meta: { | ||
73 | title: $localize`Playlist elements` | ||
74 | } | ||
75 | } | ||
76 | }, | 53 | }, |
77 | { | 54 | { |
78 | path: 'video-playlists/update/:videoPlaylistId', | 55 | path: 'video-playlists/update/:videoPlaylistId', |
79 | component: MyAccountVideoPlaylistUpdateComponent, | 56 | redirectTo: '/my-library/video-playlists/update/:videoPlaylistId', |
80 | data: { | 57 | pathMatch: 'full' |
81 | meta: { | ||
82 | title: $localize`Update playlist` | ||
83 | } | ||
84 | } | ||
85 | }, | 58 | }, |
86 | 59 | ||
87 | { | 60 | { |
88 | path: 'videos', | 61 | path: 'videos', |
89 | component: MyAccountVideosComponent, | 62 | redirectTo: '/my-library/videos', |
90 | data: { | 63 | pathMatch: 'full' |
91 | meta: { | ||
92 | title: $localize`Account videos` | ||
93 | }, | ||
94 | reuse: { | ||
95 | enabled: true, | ||
96 | key: 'my-account-videos-list' | ||
97 | } | ||
98 | } | ||
99 | }, | 64 | }, |
100 | { | 65 | { |
101 | path: 'video-imports', | 66 | path: 'video-imports', |
102 | component: MyAccountVideoImportsComponent, | 67 | redirectTo: '/my-library/video-imports', |
103 | data: { | 68 | pathMatch: 'full' |
104 | meta: { | ||
105 | title: $localize`Account video imports` | ||
106 | } | ||
107 | } | ||
108 | }, | 69 | }, |
109 | { | 70 | { |
110 | path: 'subscriptions', | 71 | path: 'subscriptions', |
111 | component: MyAccountSubscriptionsComponent, | 72 | redirectTo: '/my-library/subscriptions', |
112 | data: { | 73 | pathMatch: 'full' |
113 | meta: { | ||
114 | title: $localize`Account subscriptions` | ||
115 | } | ||
116 | } | ||
117 | }, | 74 | }, |
118 | { | 75 | { |
119 | path: 'ownership', | 76 | path: 'ownership', |
120 | component: MyAccountOwnershipComponent, | 77 | redirectTo: '/my-library/ownership', |
121 | data: { | 78 | pathMatch: 'full' |
122 | meta: { | ||
123 | title: $localize`Ownership changes` | ||
124 | } | ||
125 | } | ||
126 | }, | 79 | }, |
127 | { | 80 | { |
128 | path: 'blocklist/accounts', | 81 | path: 'blocklist/accounts', |
@@ -144,16 +97,8 @@ const myAccountRoutes: Routes = [ | |||
144 | }, | 97 | }, |
145 | { | 98 | { |
146 | path: 'history/videos', | 99 | path: 'history/videos', |
147 | component: MyAccountHistoryComponent, | 100 | redirectTo: '/my-library/history/videos', |
148 | data: { | 101 | pathMatch: 'full' |
149 | meta: { | ||
150 | title: $localize`Videos history` | ||
151 | }, | ||
152 | reuse: { | ||
153 | enabled: true, | ||
154 | key: 'my-videos-history-list' | ||
155 | } | ||
156 | } | ||
157 | }, | 102 | }, |
158 | { | 103 | { |
159 | path: 'notifications', | 104 | path: 'notifications', |