aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-studio
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-04-05 14:03:52 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-04-15 09:49:35 +0200
commit384ba8b77a8e4805c099f5ea12b41c2ca5776e26 (patch)
tree6b517033d9265d283677b85e0f57486e0e7fd8cf /client/src/app/+video-studio
parentb211106695bb82f6c32e53306081b5262c3d109d (diff)
downloadPeerTube-384ba8b77a8e4805c099f5ea12b41c2ca5776e26.tar.gz
PeerTube-384ba8b77a8e4805c099f5ea12b41c2ca5776e26.tar.zst
PeerTube-384ba8b77a8e4805c099f5ea12b41c2ca5776e26.zip
Support videos stats in client
Diffstat (limited to 'client/src/app/+video-studio')
-rw-r--r--client/src/app/+video-studio/edit/index.ts1
-rw-r--r--client/src/app/+video-studio/edit/video-studio-edit.resolver.ts18
-rw-r--r--client/src/app/+video-studio/video-studio-routing.module.ts5
-rw-r--r--client/src/app/+video-studio/video-studio.module.ts5
4 files changed, 5 insertions, 24 deletions
diff --git a/client/src/app/+video-studio/edit/index.ts b/client/src/app/+video-studio/edit/index.ts
index ff1d77fc0..15b57e1c8 100644
--- a/client/src/app/+video-studio/edit/index.ts
+++ b/client/src/app/+video-studio/edit/index.ts
@@ -1,2 +1 @@
1export * from './video-studio-edit.component' export * from './video-studio-edit.component'
2export * from './video-studio-edit.resolver'
diff --git a/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts b/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts
deleted file mode 100644
index c658be50b..000000000
--- a/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts
+++ /dev/null
@@ -1,18 +0,0 @@
1
2import { Injectable } from '@angular/core'
3import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
4import { VideoService } from '@app/shared/shared-main'
5
6@Injectable()
7export class VideoStudioEditResolver implements Resolve<any> {
8 constructor (
9 private videoService: VideoService
10 ) {
11 }
12
13 resolve (route: ActivatedRouteSnapshot) {
14 const videoId: string = route.params['videoId']
15
16 return this.videoService.getVideo({ videoId })
17 }
18}
diff --git a/client/src/app/+video-studio/video-studio-routing.module.ts b/client/src/app/+video-studio/video-studio-routing.module.ts
index bcd9b79a5..4c08631a1 100644
--- a/client/src/app/+video-studio/video-studio-routing.module.ts
+++ b/client/src/app/+video-studio/video-studio-routing.module.ts
@@ -1,6 +1,7 @@
1import { NgModule } from '@angular/core' 1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router' 2import { RouterModule, Routes } from '@angular/router'
3import { VideoStudioEditComponent, VideoStudioEditResolver } from './edit' 3import { VideoResolver } from '@app/shared/shared-main'
4import { VideoStudioEditComponent } from './edit'
4 5
5const videoStudioRoutes: Routes = [ 6const videoStudioRoutes: Routes = [
6 { 7 {
@@ -15,7 +16,7 @@ const videoStudioRoutes: Routes = [
15 } 16 }
16 }, 17 },
17 resolve: { 18 resolve: {
18 video: VideoStudioEditResolver 19 video: VideoResolver
19 } 20 }
20 } 21 }
21 ] 22 ]
diff --git a/client/src/app/+video-studio/video-studio.module.ts b/client/src/app/+video-studio/video-studio.module.ts
index 1a8763539..7c1dc02ea 100644
--- a/client/src/app/+video-studio/video-studio.module.ts
+++ b/client/src/app/+video-studio/video-studio.module.ts
@@ -1,7 +1,7 @@
1import { NgModule } from '@angular/core' 1import { NgModule } from '@angular/core'
2import { SharedFormModule } from '@app/shared/shared-forms' 2import { SharedFormModule } from '@app/shared/shared-forms'
3import { SharedMainModule } from '@app/shared/shared-main' 3import { SharedMainModule } from '@app/shared/shared-main'
4import { VideoStudioEditComponent, VideoStudioEditResolver } from './edit' 4import { VideoStudioEditComponent } from './edit'
5import { VideoStudioService } from './shared' 5import { VideoStudioService } from './shared'
6import { VideoStudioRoutingModule } from './video-studio-routing.module' 6import { VideoStudioRoutingModule } from './video-studio-routing.module'
7 7
@@ -20,8 +20,7 @@ import { VideoStudioRoutingModule } from './video-studio-routing.module'
20 exports: [], 20 exports: [],
21 21
22 providers: [ 22 providers: [
23 VideoStudioService, 23 VideoStudioService
24 VideoStudioEditResolver
25 ] 24 ]
26}) 25})
27export class VideoStudioModule { } 26export class VideoStudioModule { }