aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-09 14:28:44 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-09 14:28:44 +0200
commita685e25ca05f08ad1b3f7fbaccc8744727bd8d27 (patch)
treee50fbc2f260a0017113c4668c3c0f3d2fd76ab87 /client/src/app/videos
parent2ed6a0aedc2d2f6b1ac2fd9a1ac137772831f713 (diff)
downloadPeerTube-a685e25ca05f08ad1b3f7fbaccc8744727bd8d27.tar.gz
PeerTube-a685e25ca05f08ad1b3f7fbaccc8744727bd8d27.tar.zst
PeerTube-a685e25ca05f08ad1b3f7fbaccc8744727bd8d27.zip
Try to optimize frontend
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-edit/index.ts2
-rw-r--r--client/src/app/videos/+video-edit/video-add-routing.module.ts20
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.html (renamed from client/src/app/videos/video-edit/video-add.component.html)0
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.ts (renamed from client/src/app/videos/video-edit/video-add.component.ts)0
-rw-r--r--client/src/app/videos/+video-edit/video-add.module.ts30
-rw-r--r--client/src/app/videos/+video-edit/video-edit.component.scss (renamed from client/src/app/videos/video-edit/video-edit.component.scss)0
-rw-r--r--client/src/app/videos/+video-edit/video-update-routing.module.ts20
-rw-r--r--client/src/app/videos/+video-edit/video-update.component.html (renamed from client/src/app/videos/video-edit/video-update.component.html)0
-rw-r--r--client/src/app/videos/+video-edit/video-update.component.ts (renamed from client/src/app/videos/video-edit/video-update.component.ts)0
-rw-r--r--client/src/app/videos/+video-edit/video-update.module.ts30
-rw-r--r--client/src/app/videos/+video-watch/index.ts1
-rw-r--r--client/src/app/videos/+video-watch/video-magnet.component.html (renamed from client/src/app/videos/video-watch/video-magnet.component.html)0
-rw-r--r--client/src/app/videos/+video-watch/video-magnet.component.ts (renamed from client/src/app/videos/video-watch/video-magnet.component.ts)0
-rw-r--r--client/src/app/videos/+video-watch/video-report.component.html (renamed from client/src/app/videos/video-watch/video-report.component.html)0
-rw-r--r--client/src/app/videos/+video-watch/video-report.component.ts (renamed from client/src/app/videos/video-watch/video-report.component.ts)0
-rw-r--r--client/src/app/videos/+video-watch/video-share.component.html (renamed from client/src/app/videos/video-watch/video-share.component.html)0
-rw-r--r--client/src/app/videos/+video-watch/video-share.component.ts (renamed from client/src/app/videos/video-watch/video-share.component.ts)0
-rw-r--r--client/src/app/videos/+video-watch/video-watch-routing.module.ts20
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.html (renamed from client/src/app/videos/video-watch/video-watch.component.html)0
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.scss (renamed from client/src/app/videos/video-watch/video-watch.component.scss)0
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts (renamed from client/src/app/videos/video-watch/video-watch.component.ts)2
-rw-r--r--client/src/app/videos/+video-watch/video-watch.module.ts34
-rw-r--r--client/src/app/videos/index.ts6
-rw-r--r--client/src/app/videos/video-edit/index.ts2
-rw-r--r--client/src/app/videos/video-watch/index.ts4
-rw-r--r--client/src/app/videos/videos-routing.module.ts11
-rw-r--r--client/src/app/videos/videos.component.ts12
-rw-r--r--client/src/app/videos/videos.module.ts19
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 @@
1export * from './video-add.module'
2export * 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 @@
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
3
4import { MetaGuard } from '@ngx-meta/core'
5
6import { VideoAddComponent } from './video-add.component'
7
8const 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})
20export 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 @@
1import { NgModule } from '@angular/core'
2
3import { TagInputModule } from 'ngx-chips'
4
5import { VideoAddRoutingModule } from './video-add-routing.module'
6import { VideoAddComponent } from './video-add.component'
7import { VideoService } from '../shared'
8import { 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})
30export 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 @@
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
3
4import { MetaGuard } from '@ngx-meta/core'
5
6import { VideoUpdateComponent } from './video-update.component'
7
8const 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})
20export 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 @@
1import { NgModule } from '@angular/core'
2
3import { TagInputModule } from 'ngx-chips'
4
5import { VideoUpdateRoutingModule } from './video-update-routing.module'
6import { VideoUpdateComponent } from './video-update.component'
7import { VideoService } from '../shared'
8import { 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})
30export 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 @@
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
3
4import { MetaGuard } from '@ngx-meta/core'
5
6import { VideoWatchComponent } from './video-watch.component'
7
8const 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})
20export 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 @@
1import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' 1import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { Observable } from 'rxjs/Observable' 3import { Observable } from 'rxjs/Observable'
4import { Subscription } from 'rxjs/Subscription' 4import { 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 @@
1import { NgModule } from '@angular/core'
2
3import { VideoWatchRoutingModule } from './video-watch-routing.module'
4import { VideoService } from '../shared'
5import { SharedModule } from '../../shared'
6
7import { VideoWatchComponent } from './video-watch.component'
8import { VideoReportComponent } from './video-report.component'
9import { VideoShareComponent } from './video-share.component'
10import { 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})
34export 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 @@
1export * from './shared'
2export * from './video-edit'
3export * from './video-list'
4export * from './video-watch'
5export * from './videos-routing.module'
6export * from './videos.component'
7export * 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 @@
1export * from './video-add.component'
2export * 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 @@
1export * from './video-magnet.component'
2export * from './video-share.component'
3export * from './video-report.component'
4export * 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
4import { MetaGuard } from '@ngx-meta/core' 4import { MetaGuard } from '@ngx-meta/core'
5 5
6import { VideoAddComponent, VideoUpdateComponent } from './video-edit'
7import { VideoListComponent } from './video-list' 6import { VideoListComponent } from './video-list'
8import { VideosComponent } from './videos.component' 7import { VideosComponent } from './videos.component'
9import { VideoWatchComponent } from './video-watch'
10 8
11const videosRoutes: Routes = [ 9const 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 @@
1import { Component } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2
3import { VideoService } from './shared'
2 4
3@Component({ 5@Component({
4 template: '<router-outlet></router-outlet>' 6 template: '<router-outlet></router-outlet>'
5}) 7})
8export class VideosComponent implements OnInit {
9 constructor(private videoService: VideoService) {}
6 10
7export 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 @@
1import { NgModule } from '@angular/core' 1import { NgModule } from '@angular/core'
2 2
3import { TagInputModule } from 'ngx-chips'
4
5import { VideosRoutingModule } from './videos-routing.module' 3import { VideosRoutingModule } from './videos-routing.module'
6import { VideosComponent } from './videos.component' 4import { VideosComponent } from './videos.component'
7import { VideoAddComponent, VideoUpdateComponent } from './video-edit'
8import { LoaderComponent, VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list' 5import { LoaderComponent, VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list'
9import {
10 VideoWatchComponent,
11 VideoMagnetComponent,
12 VideoReportComponent,
13 VideoShareComponent
14} from './video-watch'
15import { VideoService } from './shared' 6import { VideoService } from './shared'
16import { SharedModule } from '../shared' 7import { 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