diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-11-20 17:18:15 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-11-21 22:09:45 +0100 |
commit | 693b1aba4675f7e3d850e0f6d07dbfc7bdff9b8c (patch) | |
tree | d6004d282a55d995eecba78bae95173bd0f11767 /client/src/app/videos | |
parent | 2c8d4697db4b5a2d645b7bfcaf91093a64597958 (diff) | |
download | PeerTube-693b1aba4675f7e3d850e0f6d07dbfc7bdff9b8c.tar.gz PeerTube-693b1aba4675f7e3d850e0f6d07dbfc7bdff9b8c.tar.zst PeerTube-693b1aba4675f7e3d850e0f6d07dbfc7bdff9b8c.zip |
Client: split in angular modules
Diffstat (limited to 'client/src/app/videos')
-rw-r--r-- | client/src/app/videos/index.ts | 3 | ||||
-rw-r--r-- | client/src/app/videos/shared/video.service.ts | 3 | ||||
-rw-r--r-- | client/src/app/videos/video-add/video-add.component.ts | 3 | ||||
-rw-r--r-- | client/src/app/videos/video-list/video-list.component.ts | 3 | ||||
-rw-r--r-- | client/src/app/videos/videos-routing.module.ts (renamed from client/src/app/videos/videos.routes.ts) | 11 | ||||
-rw-r--r-- | client/src/app/videos/videos.module.ts | 42 |
6 files changed, 59 insertions, 6 deletions
diff --git a/client/src/app/videos/index.ts b/client/src/app/videos/index.ts index a9088a907..ca386a51d 100644 --- a/client/src/app/videos/index.ts +++ b/client/src/app/videos/index.ts | |||
@@ -2,5 +2,6 @@ export * from './shared'; | |||
2 | export * from './video-add'; | 2 | export * from './video-add'; |
3 | export * from './video-list'; | 3 | export * from './video-list'; |
4 | export * from './video-watch'; | 4 | export * from './video-watch'; |
5 | export * from './videos-routing.module'; | ||
5 | export * from './videos.component'; | 6 | export * from './videos.component'; |
6 | export * from './videos.routes'; | 7 | export * from './videos.module'; |
diff --git a/client/src/app/videos/shared/video.service.ts b/client/src/app/videos/shared/video.service.ts index b1f688095..f173ef06b 100644 --- a/client/src/app/videos/shared/video.service.ts +++ b/client/src/app/videos/shared/video.service.ts | |||
@@ -4,7 +4,8 @@ import { Observable } from 'rxjs/Observable'; | |||
4 | 4 | ||
5 | import { Search } from '../../shared'; | 5 | import { Search } from '../../shared'; |
6 | import { SortField } from './sort-field.type'; | 6 | import { SortField } from './sort-field.type'; |
7 | import { AuthHttp, AuthService, RestExtractor, RestPagination, RestService, ResultList } from '../../shared'; | 7 | import { AuthService } from '../../core'; |
8 | import { AuthHttp, RestExtractor, RestPagination, RestService, ResultList } from '../../shared'; | ||
8 | import { Video } from './video.model'; | 9 | import { Video } from './video.model'; |
9 | 10 | ||
10 | @Injectable() | 11 | @Injectable() |
diff --git a/client/src/app/videos/video-add/video-add.component.ts b/client/src/app/videos/video-add/video-add.component.ts index b7bf1534f..6eab54f7e 100644 --- a/client/src/app/videos/video-add/video-add.component.ts +++ b/client/src/app/videos/video-add/video-add.component.ts | |||
@@ -4,7 +4,8 @@ import { Router } from '@angular/router'; | |||
4 | 4 | ||
5 | import { FileUploader } from 'ng2-file-upload/ng2-file-upload'; | 5 | import { FileUploader } from 'ng2-file-upload/ng2-file-upload'; |
6 | 6 | ||
7 | import { AuthService, FormReactive, VIDEO_NAME, VIDEO_DESCRIPTION, VIDEO_TAGS } from '../../shared'; | 7 | import { AuthService } from '../../core'; |
8 | import { FormReactive, VIDEO_NAME, VIDEO_DESCRIPTION, VIDEO_TAGS } from '../../shared'; | ||
8 | 9 | ||
9 | @Component({ | 10 | @Component({ |
10 | selector: 'my-videos-add', | 11 | selector: 'my-videos-add', |
diff --git a/client/src/app/videos/video-list/video-list.component.ts b/client/src/app/videos/video-list/video-list.component.ts index 6b086e938..a8b92480b 100644 --- a/client/src/app/videos/video-list/video-list.component.ts +++ b/client/src/app/videos/video-list/video-list.component.ts | |||
@@ -7,7 +7,8 @@ import { | |||
7 | Video, | 7 | Video, |
8 | VideoService | 8 | VideoService |
9 | } from '../shared'; | 9 | } from '../shared'; |
10 | import { AuthService, AuthUser, RestPagination, Search, SearchField } from '../../shared'; | 10 | import { AuthService } from '../../core'; |
11 | import { AuthUser, RestPagination, Search, SearchField } from '../../shared'; | ||
11 | import { SearchService } from '../../shared'; | 12 | import { SearchService } from '../../shared'; |
12 | 13 | ||
13 | @Component({ | 14 | @Component({ |
diff --git a/client/src/app/videos/videos.routes.ts b/client/src/app/videos/videos-routing.module.ts index ab68fbe0c..766d29d22 100644 --- a/client/src/app/videos/videos.routes.ts +++ b/client/src/app/videos/videos-routing.module.ts | |||
@@ -1,11 +1,12 @@ | |||
1 | import { Routes } from '@angular/router'; | 1 | import { NgModule } from '@angular/core'; |
2 | import { RouterModule, Routes } from '@angular/router'; | ||
2 | 3 | ||
3 | import { VideoAddComponent } from './video-add'; | 4 | import { VideoAddComponent } from './video-add'; |
4 | import { VideoListComponent } from './video-list'; | 5 | import { VideoListComponent } from './video-list'; |
5 | import { VideosComponent } from './videos.component'; | 6 | import { VideosComponent } from './videos.component'; |
6 | import { VideoWatchComponent } from './video-watch'; | 7 | import { VideoWatchComponent } from './video-watch'; |
7 | 8 | ||
8 | export const VideosRoutes: Routes = [ | 9 | const videosRoutes: Routes = [ |
9 | { | 10 | { |
10 | path: 'videos', | 11 | path: 'videos', |
11 | component: VideosComponent, | 12 | component: VideosComponent, |
@@ -35,3 +36,9 @@ export const VideosRoutes: Routes = [ | |||
35 | ] | 36 | ] |
36 | } | 37 | } |
37 | ]; | 38 | ]; |
39 | |||
40 | @NgModule({ | ||
41 | imports: [ RouterModule.forChild(videosRoutes) ], | ||
42 | exports: [ RouterModule ] | ||
43 | }) | ||
44 | export class VideosRoutingModule {} | ||
diff --git a/client/src/app/videos/videos.module.ts b/client/src/app/videos/videos.module.ts new file mode 100644 index 000000000..fb2f453b0 --- /dev/null +++ b/client/src/app/videos/videos.module.ts | |||
@@ -0,0 +1,42 @@ | |||
1 | import { NgModule } from '@angular/core'; | ||
2 | |||
3 | import { VideosRoutingModule } from './videos-routing.module'; | ||
4 | import { VideosComponent } from './videos.component'; | ||
5 | import { VideoAddComponent } from './video-add'; | ||
6 | import { VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list'; | ||
7 | import { VideoWatchComponent, VideoMagnetComponent, VideoShareComponent, WebTorrentService } from './video-watch'; | ||
8 | import { LoaderComponent, VideoService } from './shared'; | ||
9 | import { SharedModule } from '../shared'; | ||
10 | |||
11 | @NgModule({ | ||
12 | imports: [ | ||
13 | VideosRoutingModule, | ||
14 | SharedModule | ||
15 | ], | ||
16 | |||
17 | declarations: [ | ||
18 | VideosComponent, | ||
19 | |||
20 | VideoAddComponent, | ||
21 | |||
22 | VideoListComponent, | ||
23 | VideoMiniatureComponent, | ||
24 | VideoSortComponent, | ||
25 | |||
26 | VideoWatchComponent, | ||
27 | VideoMagnetComponent, | ||
28 | VideoShareComponent, | ||
29 | |||
30 | LoaderComponent | ||
31 | ], | ||
32 | |||
33 | exports: [ | ||
34 | VideosComponent | ||
35 | ], | ||
36 | |||
37 | providers: [ | ||
38 | VideoService, | ||
39 | WebTorrentService | ||
40 | ] | ||
41 | }) | ||
42 | export class VideosModule { } | ||