diff options
Diffstat (limited to 'client/src/app/videos')
28 files changed, 174 insertions, 39 deletions
diff --git a/client/src/app/videos/+video-edit/index.ts b/client/src/app/videos/+video-edit/index.ts new file mode 100644 index 000000000..63e0414dd --- /dev/null +++ b/client/src/app/videos/+video-edit/index.ts | |||
@@ -0,0 +1,2 @@ | |||
1 | export * from './video-add.module' | ||
2 | export * from './video-update.module' | ||
diff --git a/client/src/app/videos/+video-edit/video-add-routing.module.ts b/client/src/app/videos/+video-edit/video-add-routing.module.ts new file mode 100644 index 000000000..9e8fa4acc --- /dev/null +++ b/client/src/app/videos/+video-edit/video-add-routing.module.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | |||
4 | import { MetaGuard } from '@ngx-meta/core' | ||
5 | |||
6 | import { VideoAddComponent } from './video-add.component' | ||
7 | |||
8 | const videoAddRoutes: Routes = [ | ||
9 | { | ||
10 | path: '', | ||
11 | component: VideoAddComponent, | ||
12 | canActivateChild: [ MetaGuard ] | ||
13 | } | ||
14 | ] | ||
15 | |||
16 | @NgModule({ | ||
17 | imports: [ RouterModule.forChild(videoAddRoutes) ], | ||
18 | exports: [ RouterModule ] | ||
19 | }) | ||
20 | export class VideoAddRoutingModule {} | ||
diff --git a/client/src/app/videos/video-edit/video-add.component.html b/client/src/app/videos/+video-edit/video-add.component.html index 698152ff9..698152ff9 100644 --- a/client/src/app/videos/video-edit/video-add.component.html +++ b/client/src/app/videos/+video-edit/video-add.component.html | |||
diff --git a/client/src/app/videos/video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 21311b184..21311b184 100644 --- a/client/src/app/videos/video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts | |||
diff --git a/client/src/app/videos/+video-edit/video-add.module.ts b/client/src/app/videos/+video-edit/video-add.module.ts new file mode 100644 index 000000000..141d33ad2 --- /dev/null +++ b/client/src/app/videos/+video-edit/video-add.module.ts | |||
@@ -0,0 +1,30 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | |||
3 | import { TagInputModule } from 'ngx-chips' | ||
4 | |||
5 | import { VideoAddRoutingModule } from './video-add-routing.module' | ||
6 | import { VideoAddComponent } from './video-add.component' | ||
7 | import { VideoService } from '../shared' | ||
8 | import { SharedModule } from '../../shared' | ||
9 | |||
10 | @NgModule({ | ||
11 | imports: [ | ||
12 | TagInputModule, | ||
13 | |||
14 | VideoAddRoutingModule, | ||
15 | SharedModule | ||
16 | ], | ||
17 | |||
18 | declarations: [ | ||
19 | VideoAddComponent | ||
20 | ], | ||
21 | |||
22 | exports: [ | ||
23 | VideoAddComponent | ||
24 | ], | ||
25 | |||
26 | providers: [ | ||
27 | VideoService | ||
28 | ] | ||
29 | }) | ||
30 | export class VideoAddModule { } | ||
diff --git a/client/src/app/videos/video-edit/video-edit.component.scss b/client/src/app/videos/+video-edit/video-edit.component.scss index 9ee0c520c..9ee0c520c 100644 --- a/client/src/app/videos/video-edit/video-edit.component.scss +++ b/client/src/app/videos/+video-edit/video-edit.component.scss | |||
diff --git a/client/src/app/videos/+video-edit/video-update-routing.module.ts b/client/src/app/videos/+video-edit/video-update-routing.module.ts new file mode 100644 index 000000000..1d06a7ac3 --- /dev/null +++ b/client/src/app/videos/+video-edit/video-update-routing.module.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | |||
4 | import { MetaGuard } from '@ngx-meta/core' | ||
5 | |||
6 | import { VideoUpdateComponent } from './video-update.component' | ||
7 | |||
8 | const videoUpdateRoutes: Routes = [ | ||
9 | { | ||
10 | path: '', | ||
11 | component: VideoUpdateComponent, | ||
12 | canActivateChild: [ MetaGuard ] | ||
13 | } | ||
14 | ] | ||
15 | |||
16 | @NgModule({ | ||
17 | imports: [ RouterModule.forChild(videoUpdateRoutes) ], | ||
18 | exports: [ RouterModule ] | ||
19 | }) | ||
20 | export class VideoUpdateRoutingModule {} | ||
diff --git a/client/src/app/videos/video-edit/video-update.component.html b/client/src/app/videos/+video-edit/video-update.component.html index 7f4faf21b..7f4faf21b 100644 --- a/client/src/app/videos/video-edit/video-update.component.html +++ b/client/src/app/videos/+video-edit/video-update.component.html | |||
diff --git a/client/src/app/videos/video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts index 141ed3522..141ed3522 100644 --- a/client/src/app/videos/video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts | |||
diff --git a/client/src/app/videos/+video-edit/video-update.module.ts b/client/src/app/videos/+video-edit/video-update.module.ts new file mode 100644 index 000000000..eeb2e35e2 --- /dev/null +++ b/client/src/app/videos/+video-edit/video-update.module.ts | |||
@@ -0,0 +1,30 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | |||
3 | import { TagInputModule } from 'ngx-chips' | ||
4 | |||
5 | import { VideoUpdateRoutingModule } from './video-update-routing.module' | ||
6 | import { VideoUpdateComponent } from './video-update.component' | ||
7 | import { VideoService } from '../shared' | ||
8 | import { SharedModule } from '../../shared' | ||
9 | |||
10 | @NgModule({ | ||
11 | imports: [ | ||
12 | TagInputModule, | ||
13 | |||
14 | VideoUpdateRoutingModule, | ||
15 | SharedModule | ||
16 | ], | ||
17 | |||
18 | declarations: [ | ||
19 | VideoUpdateComponent | ||
20 | ], | ||
21 | |||
22 | exports: [ | ||
23 | VideoUpdateComponent | ||
24 | ], | ||
25 | |||
26 | providers: [ | ||
27 | VideoService | ||
28 | ] | ||
29 | }) | ||
30 | export class VideoUpdateModule { } | ||
diff --git a/client/src/app/videos/+video-watch/index.ts b/client/src/app/videos/+video-watch/index.ts new file mode 100644 index 000000000..b19bfdb1e --- /dev/null +++ b/client/src/app/videos/+video-watch/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './video-watch.module' | |||
diff --git a/client/src/app/videos/video-watch/video-magnet.component.html b/client/src/app/videos/+video-watch/video-magnet.component.html index 484280c45..484280c45 100644 --- a/client/src/app/videos/video-watch/video-magnet.component.html +++ b/client/src/app/videos/+video-watch/video-magnet.component.html | |||
diff --git a/client/src/app/videos/video-watch/video-magnet.component.ts b/client/src/app/videos/+video-watch/video-magnet.component.ts index f9432e92c..f9432e92c 100644 --- a/client/src/app/videos/video-watch/video-magnet.component.ts +++ b/client/src/app/videos/+video-watch/video-magnet.component.ts | |||
diff --git a/client/src/app/videos/video-watch/video-report.component.html b/client/src/app/videos/+video-watch/video-report.component.html index 741080ead..741080ead 100644 --- a/client/src/app/videos/video-watch/video-report.component.html +++ b/client/src/app/videos/+video-watch/video-report.component.html | |||
diff --git a/client/src/app/videos/video-watch/video-report.component.ts b/client/src/app/videos/+video-watch/video-report.component.ts index d9c83a640..d9c83a640 100644 --- a/client/src/app/videos/video-watch/video-report.component.ts +++ b/client/src/app/videos/+video-watch/video-report.component.ts | |||
diff --git a/client/src/app/videos/video-watch/video-share.component.html b/client/src/app/videos/+video-watch/video-share.component.html index 88f59c063..88f59c063 100644 --- a/client/src/app/videos/video-watch/video-share.component.html +++ b/client/src/app/videos/+video-watch/video-share.component.html | |||
diff --git a/client/src/app/videos/video-watch/video-share.component.ts b/client/src/app/videos/+video-watch/video-share.component.ts index 133f93498..133f93498 100644 --- a/client/src/app/videos/video-watch/video-share.component.ts +++ b/client/src/app/videos/+video-watch/video-share.component.ts | |||
diff --git a/client/src/app/videos/+video-watch/video-watch-routing.module.ts b/client/src/app/videos/+video-watch/video-watch-routing.module.ts new file mode 100644 index 000000000..97fa5c725 --- /dev/null +++ b/client/src/app/videos/+video-watch/video-watch-routing.module.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | |||
4 | import { MetaGuard } from '@ngx-meta/core' | ||
5 | |||
6 | import { VideoWatchComponent } from './video-watch.component' | ||
7 | |||
8 | const videoWatchRoutes: Routes = [ | ||
9 | { | ||
10 | path: '', | ||
11 | component: VideoWatchComponent, | ||
12 | canActivateChild: [ MetaGuard ] | ||
13 | } | ||
14 | ] | ||
15 | |||
16 | @NgModule({ | ||
17 | imports: [ RouterModule.forChild(videoWatchRoutes) ], | ||
18 | exports: [ RouterModule ] | ||
19 | }) | ||
20 | export class VideoWatchRoutingModule {} | ||
diff --git a/client/src/app/videos/video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index 88863131a..88863131a 100644 --- a/client/src/app/videos/video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html | |||
diff --git a/client/src/app/videos/video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index 69661747c..69661747c 100644 --- a/client/src/app/videos/video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss | |||
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index db3e1cdd6..874dd5997 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { Observable } from 'rxjs/Observable' | 3 | import { Observable } from 'rxjs/Observable' |
4 | import { Subscription } from 'rxjs/Subscription' | 4 | import { Subscription } from 'rxjs/Subscription' |
diff --git a/client/src/app/videos/+video-watch/video-watch.module.ts b/client/src/app/videos/+video-watch/video-watch.module.ts new file mode 100644 index 000000000..5f20b171e --- /dev/null +++ b/client/src/app/videos/+video-watch/video-watch.module.ts | |||
@@ -0,0 +1,34 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | |||
3 | import { VideoWatchRoutingModule } from './video-watch-routing.module' | ||
4 | import { VideoService } from '../shared' | ||
5 | import { SharedModule } from '../../shared' | ||
6 | |||
7 | import { VideoWatchComponent } from './video-watch.component' | ||
8 | import { VideoReportComponent } from './video-report.component' | ||
9 | import { VideoShareComponent } from './video-share.component' | ||
10 | import { VideoMagnetComponent } from './video-magnet.component' | ||
11 | |||
12 | @NgModule({ | ||
13 | imports: [ | ||
14 | VideoWatchRoutingModule, | ||
15 | SharedModule | ||
16 | ], | ||
17 | |||
18 | declarations: [ | ||
19 | VideoWatchComponent, | ||
20 | |||
21 | VideoMagnetComponent, | ||
22 | VideoShareComponent, | ||
23 | VideoReportComponent | ||
24 | ], | ||
25 | |||
26 | exports: [ | ||
27 | VideoWatchComponent | ||
28 | ], | ||
29 | |||
30 | providers: [ | ||
31 | VideoService | ||
32 | ] | ||
33 | }) | ||
34 | export class VideoWatchModule { } | ||
diff --git a/client/src/app/videos/index.ts b/client/src/app/videos/index.ts index 83edcc758..028a5854b 100644 --- a/client/src/app/videos/index.ts +++ b/client/src/app/videos/index.ts | |||
@@ -1,7 +1 @@ | |||
1 | export * from './shared' | ||
2 | export * from './video-edit' | ||
3 | export * from './video-list' | ||
4 | export * from './video-watch' | ||
5 | export * from './videos-routing.module' | ||
6 | export * from './videos.component' | ||
7 | export * from './videos.module' | export * from './videos.module' | |
diff --git a/client/src/app/videos/video-edit/index.ts b/client/src/app/videos/video-edit/index.ts deleted file mode 100644 index 3b4a9cb87..000000000 --- a/client/src/app/videos/video-edit/index.ts +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | export * from './video-add.component' | ||
2 | export * from './video-update.component' | ||
diff --git a/client/src/app/videos/video-watch/index.ts b/client/src/app/videos/video-watch/index.ts deleted file mode 100644 index 105872469..000000000 --- a/client/src/app/videos/video-watch/index.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export * from './video-magnet.component' | ||
2 | export * from './video-share.component' | ||
3 | export * from './video-report.component' | ||
4 | export * from './video-watch.component' | ||
diff --git a/client/src/app/videos/videos-routing.module.ts b/client/src/app/videos/videos-routing.module.ts index 715671ba7..225b6b018 100644 --- a/client/src/app/videos/videos-routing.module.ts +++ b/client/src/app/videos/videos-routing.module.ts | |||
@@ -3,10 +3,8 @@ import { RouterModule, Routes } from '@angular/router' | |||
3 | 3 | ||
4 | import { MetaGuard } from '@ngx-meta/core' | 4 | import { MetaGuard } from '@ngx-meta/core' |
5 | 5 | ||
6 | import { VideoAddComponent, VideoUpdateComponent } from './video-edit' | ||
7 | import { VideoListComponent } from './video-list' | 6 | import { VideoListComponent } from './video-list' |
8 | import { VideosComponent } from './videos.component' | 7 | import { VideosComponent } from './videos.component' |
9 | import { VideoWatchComponent } from './video-watch' | ||
10 | 8 | ||
11 | const videosRoutes: Routes = [ | 9 | const videosRoutes: Routes = [ |
12 | { | 10 | { |
@@ -25,7 +23,7 @@ const videosRoutes: Routes = [ | |||
25 | }, | 23 | }, |
26 | { | 24 | { |
27 | path: 'add', | 25 | path: 'add', |
28 | component: VideoAddComponent, | 26 | loadChildren: 'app/videos/+video-edit#VideoAddModule', |
29 | data: { | 27 | data: { |
30 | meta: { | 28 | meta: { |
31 | title: 'Add a video' | 29 | title: 'Add a video' |
@@ -34,7 +32,7 @@ const videosRoutes: Routes = [ | |||
34 | }, | 32 | }, |
35 | { | 33 | { |
36 | path: 'edit/:uuid', | 34 | path: 'edit/:uuid', |
37 | component: VideoUpdateComponent, | 35 | loadChildren: 'app/videos/+video-edit#VideoUpdateModule', |
38 | data: { | 36 | data: { |
39 | meta: { | 37 | meta: { |
40 | title: 'Edit a video' | 38 | title: 'Edit a video' |
@@ -47,7 +45,10 @@ const videosRoutes: Routes = [ | |||
47 | }, | 45 | }, |
48 | { | 46 | { |
49 | path: 'watch/:uuid', | 47 | path: 'watch/:uuid', |
50 | component: VideoWatchComponent | 48 | loadChildren: 'app/videos/+video-watch#VideoWatchModule', |
49 | data: { | ||
50 | preload: 3000 | ||
51 | } | ||
51 | } | 52 | } |
52 | ] | 53 | ] |
53 | } | 54 | } |
diff --git a/client/src/app/videos/videos.component.ts b/client/src/app/videos/videos.component.ts index 972c2221f..26d9d28d4 100644 --- a/client/src/app/videos/videos.component.ts +++ b/client/src/app/videos/videos.component.ts | |||
@@ -1,8 +1,16 @@ | |||
1 | import { Component } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | |||
3 | import { VideoService } from './shared' | ||
2 | 4 | ||
3 | @Component({ | 5 | @Component({ |
4 | template: '<router-outlet></router-outlet>' | 6 | template: '<router-outlet></router-outlet>' |
5 | }) | 7 | }) |
8 | export class VideosComponent implements OnInit { | ||
9 | constructor(private videoService: VideoService) {} | ||
6 | 10 | ||
7 | export class VideosComponent { | 11 | ngOnInit () { |
12 | this.videoService.loadVideoCategories() | ||
13 | this.videoService.loadVideoLicences() | ||
14 | this.videoService.loadVideoLanguages() | ||
15 | } | ||
8 | } | 16 | } |
diff --git a/client/src/app/videos/videos.module.ts b/client/src/app/videos/videos.module.ts index bc86118cc..3a0c3feac 100644 --- a/client/src/app/videos/videos.module.ts +++ b/client/src/app/videos/videos.module.ts | |||
@@ -1,24 +1,13 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | 2 | ||
3 | import { TagInputModule } from 'ngx-chips' | ||
4 | |||
5 | import { VideosRoutingModule } from './videos-routing.module' | 3 | import { VideosRoutingModule } from './videos-routing.module' |
6 | import { VideosComponent } from './videos.component' | 4 | import { VideosComponent } from './videos.component' |
7 | import { VideoAddComponent, VideoUpdateComponent } from './video-edit' | ||
8 | import { LoaderComponent, VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list' | 5 | import { LoaderComponent, VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list' |
9 | import { | ||
10 | VideoWatchComponent, | ||
11 | VideoMagnetComponent, | ||
12 | VideoReportComponent, | ||
13 | VideoShareComponent | ||
14 | } from './video-watch' | ||
15 | import { VideoService } from './shared' | 6 | import { VideoService } from './shared' |
16 | import { SharedModule } from '../shared' | 7 | import { SharedModule } from '../shared' |
17 | 8 | ||
18 | @NgModule({ | 9 | @NgModule({ |
19 | imports: [ | 10 | imports: [ |
20 | TagInputModule, | ||
21 | |||
22 | VideosRoutingModule, | 11 | VideosRoutingModule, |
23 | SharedModule | 12 | SharedModule |
24 | ], | 13 | ], |
@@ -26,18 +15,10 @@ import { SharedModule } from '../shared' | |||
26 | declarations: [ | 15 | declarations: [ |
27 | VideosComponent, | 16 | VideosComponent, |
28 | 17 | ||
29 | VideoAddComponent, | ||
30 | VideoUpdateComponent, | ||
31 | |||
32 | VideoListComponent, | 18 | VideoListComponent, |
33 | VideoMiniatureComponent, | 19 | VideoMiniatureComponent, |
34 | VideoSortComponent, | 20 | VideoSortComponent, |
35 | 21 | ||
36 | VideoWatchComponent, | ||
37 | VideoMagnetComponent, | ||
38 | VideoShareComponent, | ||
39 | VideoReportComponent, | ||
40 | |||
41 | LoaderComponent | 22 | LoaderComponent |
42 | ], | 23 | ], |
43 | 24 | ||