diff options
Diffstat (limited to 'client')
26 files changed, 109 insertions, 108 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 94f1021bf..eb892bbfd 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | |||
@@ -200,7 +200,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
200 | resolutions: {} | 200 | resolutions: {} |
201 | } | 201 | } |
202 | }, | 202 | }, |
203 | videoEditor: { | 203 | videoStudio: { |
204 | enabled: null | 204 | enabled: null |
205 | }, | 205 | }, |
206 | autoBlacklist: { | 206 | autoBlacklist: { |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html index 52d6c79f6..5c0bea4a5 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html | |||
@@ -193,9 +193,9 @@ | |||
193 | </div> | 193 | </div> |
194 | </div> | 194 | </div> |
195 | 195 | ||
196 | <div class="form-row mt-2"> <!-- video editor grid --> | 196 | <div class="form-row mt-2"> <!-- video studio grid --> |
197 | <div class="form-group col-12 col-lg-4 col-xl-3"> | 197 | <div class="form-group col-12 col-lg-4 col-xl-3"> |
198 | <div i18n class="inner-form-title">VIDEO EDITOR</div> | 198 | <div i18n class="inner-form-title">VIDEO STUDIO</div> |
199 | <div i18n class="inner-form-description"> | 199 | <div i18n class="inner-form-description"> |
200 | Allows your users to edit their video (cut, add intro/outro, add a watermark etc) | 200 | Allows your users to edit their video (cut, add intro/outro, add a watermark etc) |
201 | </div> | 201 | </div> |
@@ -203,14 +203,14 @@ | |||
203 | 203 | ||
204 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | 204 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
205 | 205 | ||
206 | <ng-container formGroupName="videoEditor"> | 206 | <ng-container formGroupName="videoStudio"> |
207 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> | 207 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
208 | <my-peertube-checkbox | 208 | <my-peertube-checkbox |
209 | inputName="videoEditorEnabled" formControlName="enabled" | 209 | inputName="videoStudioEnabled" formControlName="enabled" |
210 | i18n-labelText labelText="Enable video editor" | 210 | i18n-labelText labelText="Enable video studio" |
211 | > | 211 | > |
212 | <ng-container ngProjectAs="description" *ngIf="!isTranscodingEnabled()"> | 212 | <ng-container ngProjectAs="description" *ngIf="!isTranscodingEnabled()"> |
213 | <span i18n>⚠️ You need to enable transcoding first to enable video editor</span> | 213 | <span i18n>⚠️ You need to enable transcoding first to enable video studio</span> |
214 | </ng-container> | 214 | </ng-container> |
215 | </my-peertube-checkbox> | 215 | </my-peertube-checkbox> |
216 | </div> | 216 | </div> |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts index 948c10b69..a38438e3a 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts | |||
@@ -72,7 +72,7 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges { | |||
72 | 72 | ||
73 | private checkTranscodingFields () { | 73 | private checkTranscodingFields () { |
74 | const transcodingControl = this.form.get('transcoding.enabled') | 74 | const transcodingControl = this.form.get('transcoding.enabled') |
75 | const videoEditorControl = this.form.get('videoEditor.enabled') | 75 | const videoStudioControl = this.form.get('videoStudio.enabled') |
76 | const hlsControl = this.form.get('transcoding.hls.enabled') | 76 | const hlsControl = this.form.get('transcoding.hls.enabled') |
77 | const webtorrentControl = this.form.get('transcoding.webtorrent.enabled') | 77 | const webtorrentControl = this.form.get('transcoding.webtorrent.enabled') |
78 | 78 | ||
@@ -101,7 +101,7 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges { | |||
101 | transcodingControl.valueChanges | 101 | transcodingControl.valueChanges |
102 | .subscribe(newValue => { | 102 | .subscribe(newValue => { |
103 | if (newValue === false) { | 103 | if (newValue === false) { |
104 | videoEditorControl.setValue(false) | 104 | videoStudioControl.setValue(false) |
105 | } | 105 | } |
106 | }) | 106 | }) |
107 | } | 107 | } |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts index 187a3818a..7c13282fa 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts | |||
@@ -45,7 +45,7 @@ export class MyAccountNotificationPreferencesComponent implements OnInit { | |||
45 | abuseStateChange: $localize`One of your abuse reports has been accepted or rejected by moderators`, | 45 | abuseStateChange: $localize`One of your abuse reports has been accepted or rejected by moderators`, |
46 | newPeerTubeVersion: $localize`A new PeerTube version is available`, | 46 | newPeerTubeVersion: $localize`A new PeerTube version is available`, |
47 | newPluginVersion: $localize`One of your plugin/theme has a new available version`, | 47 | newPluginVersion: $localize`One of your plugin/theme has a new available version`, |
48 | myVideoEditionFinished: $localize`Video edition finished` | 48 | myVideoStudioEditionFinished: $localize`Video studio edition has finished` |
49 | } | 49 | } |
50 | this.notificationSettingGroups = [ | 50 | this.notificationSettingGroups = [ |
51 | { | 51 | { |
@@ -64,7 +64,7 @@ export class MyAccountNotificationPreferencesComponent implements OnInit { | |||
64 | 'blacklistOnMyVideo', | 64 | 'blacklistOnMyVideo', |
65 | 'myVideoPublished', | 65 | 'myVideoPublished', |
66 | 'myVideoImportFinished', | 66 | 'myVideoImportFinished', |
67 | 'myVideoEditionFinished' | 67 | 'myVideoStudioEditionFinished' |
68 | ] | 68 | ] |
69 | }, | 69 | }, |
70 | 70 | ||
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index 45a586981..a364b9b6a 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts | |||
@@ -205,9 +205,9 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { | |||
205 | private buildActions () { | 205 | private buildActions () { |
206 | this.videoActions = [ | 206 | this.videoActions = [ |
207 | { | 207 | { |
208 | label: $localize`Editor`, | 208 | label: $localize`Studio`, |
209 | linkBuilder: ({ video }) => [ '/video-editor/edit', video.uuid ], | 209 | linkBuilder: ({ video }) => [ '/studio/edit', video.uuid ], |
210 | isDisplayed: ({ video }) => video.isEditableBy(this.authService.getUser(), this.serverService.getHTMLConfig().videoEditor.enabled), | 210 | isDisplayed: ({ video }) => video.isEditableBy(this.authService.getUser(), this.serverService.getHTMLConfig().videoStudio.enabled), |
211 | iconName: 'film' | 211 | iconName: 'film' |
212 | }, | 212 | }, |
213 | { | 213 | { |
diff --git a/client/src/app/+video-editor/edit/index.ts b/client/src/app/+video-editor/edit/index.ts deleted file mode 100644 index 390ca80fc..000000000 --- a/client/src/app/+video-editor/edit/index.ts +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | export * from './video-editor-edit.component' | ||
2 | export * from './video-editor-edit.resolver' | ||
diff --git a/client/src/app/+video-editor/index.ts b/client/src/app/+video-editor/index.ts deleted file mode 100644 index 5a9e9fdd0..000000000 --- a/client/src/app/+video-editor/index.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export * from './video-editor.module' | ||
diff --git a/client/src/app/+video-editor/shared/index.ts b/client/src/app/+video-editor/shared/index.ts deleted file mode 100644 index eaf88b6f4..000000000 --- a/client/src/app/+video-editor/shared/index.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export * from './video-editor.service' | ||
diff --git a/client/src/app/+video-editor/video-editor-routing.module.ts b/client/src/app/+video-editor/video-editor-routing.module.ts deleted file mode 100644 index 9f37a0dae..000000000 --- a/client/src/app/+video-editor/video-editor-routing.module.ts +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | import { VideoEditorEditResolver } from './edit' | ||
4 | import { VideoEditorEditComponent } from './edit/video-editor-edit.component' | ||
5 | |||
6 | const videoEditorRoutes: Routes = [ | ||
7 | { | ||
8 | path: '', | ||
9 | children: [ | ||
10 | { | ||
11 | path: 'edit/:videoId', | ||
12 | component: VideoEditorEditComponent, | ||
13 | data: { | ||
14 | meta: { | ||
15 | title: $localize`Edit video` | ||
16 | } | ||
17 | }, | ||
18 | resolve: { | ||
19 | video: VideoEditorEditResolver | ||
20 | } | ||
21 | } | ||
22 | ] | ||
23 | } | ||
24 | ] | ||
25 | |||
26 | @NgModule({ | ||
27 | imports: [ RouterModule.forChild(videoEditorRoutes) ], | ||
28 | exports: [ RouterModule ] | ||
29 | }) | ||
30 | export class VideoEditorRoutingModule {} | ||
diff --git a/client/src/app/+video-editor/video-editor.module.ts b/client/src/app/+video-editor/video-editor.module.ts deleted file mode 100644 index 7bbebc17b..000000000 --- a/client/src/app/+video-editor/video-editor.module.ts +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { SharedFormModule } from '@app/shared/shared-forms' | ||
3 | import { SharedMainModule } from '@app/shared/shared-main' | ||
4 | import { VideoEditorEditComponent, VideoEditorEditResolver } from './edit' | ||
5 | import { VideoEditorService } from './shared' | ||
6 | import { VideoEditorRoutingModule } from './video-editor-routing.module' | ||
7 | |||
8 | @NgModule({ | ||
9 | imports: [ | ||
10 | VideoEditorRoutingModule, | ||
11 | |||
12 | SharedMainModule, | ||
13 | SharedFormModule | ||
14 | ], | ||
15 | |||
16 | declarations: [ | ||
17 | VideoEditorEditComponent | ||
18 | ], | ||
19 | |||
20 | exports: [], | ||
21 | |||
22 | providers: [ | ||
23 | VideoEditorService, | ||
24 | VideoEditorEditResolver | ||
25 | ] | ||
26 | }) | ||
27 | export class VideoEditorModule { } | ||
diff --git a/client/src/app/+video-studio/edit/index.ts b/client/src/app/+video-studio/edit/index.ts new file mode 100644 index 000000000..ff1d77fc0 --- /dev/null +++ b/client/src/app/+video-studio/edit/index.ts | |||
@@ -0,0 +1,2 @@ | |||
1 | export * from './video-studio-edit.component' | ||
2 | export * from './video-studio-edit.resolver' | ||
diff --git a/client/src/app/+video-editor/edit/video-editor-edit.component.html b/client/src/app/+video-studio/edit/video-studio-edit.component.html index d33dfaf18..a9f34811f 100644 --- a/client/src/app/+video-editor/edit/video-editor-edit.component.html +++ b/client/src/app/+video-studio/edit/video-studio-edit.component.html | |||
@@ -1,5 +1,5 @@ | |||
1 | <div class="margin-content"> | 1 | <div class="margin-content"> |
2 | <h1 class="title-page title-page-single" i18n>Edit {{ video.name }}</h1> | 2 | <h1 class="title-page title-page-single" i18n>Studio for {{ video.name }}</h1> |
3 | 3 | ||
4 | <div class="columns"> | 4 | <div class="columns"> |
5 | <form role="form" [formGroup]="form"> | 5 | <form role="form" [formGroup]="form"> |
diff --git a/client/src/app/+video-editor/edit/video-editor-edit.component.scss b/client/src/app/+video-studio/edit/video-studio-edit.component.scss index 43f336f59..43f336f59 100644 --- a/client/src/app/+video-editor/edit/video-editor-edit.component.scss +++ b/client/src/app/+video-studio/edit/video-studio-edit.component.scss | |||
diff --git a/client/src/app/+video-editor/edit/video-editor-edit.component.ts b/client/src/app/+video-studio/edit/video-studio-edit.component.ts index 0adf93335..392b65767 100644 --- a/client/src/app/+video-editor/edit/video-editor-edit.component.ts +++ b/client/src/app/+video-studio/edit/video-studio-edit.component.ts | |||
@@ -2,18 +2,18 @@ import { Component, OnInit } from '@angular/core' | |||
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { ConfirmService, Notifier, ServerService } from '@app/core' | 3 | import { ConfirmService, Notifier, ServerService } from '@app/core' |
4 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 4 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
5 | import { Video, VideoDetails } from '@app/shared/shared-main' | 5 | import { VideoDetails } from '@app/shared/shared-main' |
6 | import { LoadingBarService } from '@ngx-loading-bar/core' | 6 | import { LoadingBarService } from '@ngx-loading-bar/core' |
7 | import { secondsToTime } from '@shared/core-utils' | 7 | import { secondsToTime } from '@shared/core-utils' |
8 | import { VideoEditorTask, VideoEditorTaskCut } from '@shared/models' | 8 | import { VideoStudioTask, VideoStudioTaskCut } from '@shared/models' |
9 | import { VideoEditorService } from '../shared' | 9 | import { VideoStudioService } from '../shared' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
12 | selector: 'my-video-editor-edit', | 12 | selector: 'my-video-studio-edit', |
13 | templateUrl: './video-editor-edit.component.html', | 13 | templateUrl: './video-studio-edit.component.html', |
14 | styleUrls: [ './video-editor-edit.component.scss' ] | 14 | styleUrls: [ './video-studio-edit.component.scss' ] |
15 | }) | 15 | }) |
16 | export class VideoEditorEditComponent extends FormReactive implements OnInit { | 16 | export class VideoStudioEditComponent extends FormReactive implements OnInit { |
17 | isRunningEdition = false | 17 | isRunningEdition = false |
18 | 18 | ||
19 | video: VideoDetails | 19 | video: VideoDetails |
@@ -24,7 +24,7 @@ export class VideoEditorEditComponent extends FormReactive implements OnInit { | |||
24 | private notifier: Notifier, | 24 | private notifier: Notifier, |
25 | private router: Router, | 25 | private router: Router, |
26 | private route: ActivatedRoute, | 26 | private route: ActivatedRoute, |
27 | private videoEditorService: VideoEditorService, | 27 | private videoStudioService: VideoStudioService, |
28 | private loadingBar: LoadingBarService, | 28 | private loadingBar: LoadingBarService, |
29 | private confirmService: ConfirmService | 29 | private confirmService: ConfirmService |
30 | ) { | 30 | ) { |
@@ -84,11 +84,13 @@ export class VideoEditorEditComponent extends FormReactive implements OnInit { | |||
84 | 84 | ||
85 | this.loadingBar.useRef().start() | 85 | this.loadingBar.useRef().start() |
86 | 86 | ||
87 | return this.videoEditorService.editVideo(this.video.uuid, tasks) | 87 | return this.videoStudioService.editVideo(this.video.uuid, tasks) |
88 | .subscribe({ | 88 | .subscribe({ |
89 | next: () => { | 89 | next: () => { |
90 | this.notifier.success($localize`Video updated.`) | 90 | this.notifier.success($localize`Edition tasks created.`) |
91 | this.router.navigateByUrl(Video.buildWatchUrl(this.video)) | 91 | |
92 | // Don't redirect to old video version watch page that could be confusing for users | ||
93 | this.router.navigateByUrl('/my-library/videos') | ||
92 | }, | 94 | }, |
93 | 95 | ||
94 | error: err => { | 96 | error: err => { |
@@ -153,13 +155,13 @@ export class VideoEditorEditComponent extends FormReactive implements OnInit { | |||
153 | } | 155 | } |
154 | 156 | ||
155 | private buildTasks () { | 157 | private buildTasks () { |
156 | const tasks: VideoEditorTask[] = [] | 158 | const tasks: VideoStudioTask[] = [] |
157 | const value = this.form.value | 159 | const value = this.form.value |
158 | 160 | ||
159 | const cut = value['cut'] | 161 | const cut = value['cut'] |
160 | if (cut['start'] !== 0 || cut['end'] !== this.video.duration) { | 162 | if (cut['start'] !== 0 || cut['end'] !== this.video.duration) { |
161 | 163 | ||
162 | const options: VideoEditorTaskCut['options'] = {} | 164 | const options: VideoStudioTaskCut['options'] = {} |
163 | if (cut['start'] !== 0) options.start = cut['start'] | 165 | if (cut['start'] !== 0) options.start = cut['start'] |
164 | if (cut['end'] !== this.video.duration) options.end = cut['end'] | 166 | if (cut['end'] !== this.video.duration) options.end = cut['end'] |
165 | 167 | ||
diff --git a/client/src/app/+video-editor/edit/video-editor-edit.resolver.ts b/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts index 7b95ae834..c658be50b 100644 --- a/client/src/app/+video-editor/edit/video-editor-edit.resolver.ts +++ b/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts | |||
@@ -4,7 +4,7 @@ import { ActivatedRouteSnapshot, Resolve } from '@angular/router' | |||
4 | import { VideoService } from '@app/shared/shared-main' | 4 | import { VideoService } from '@app/shared/shared-main' |
5 | 5 | ||
6 | @Injectable() | 6 | @Injectable() |
7 | export class VideoEditorEditResolver implements Resolve<any> { | 7 | export class VideoStudioEditResolver implements Resolve<any> { |
8 | constructor ( | 8 | constructor ( |
9 | private videoService: VideoService | 9 | private videoService: VideoService |
10 | ) { | 10 | ) { |
diff --git a/client/src/app/+video-studio/index.ts b/client/src/app/+video-studio/index.ts new file mode 100644 index 000000000..d50c21cdc --- /dev/null +++ b/client/src/app/+video-studio/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './video-studio.module' | |||
diff --git a/client/src/app/+video-studio/shared/index.ts b/client/src/app/+video-studio/shared/index.ts new file mode 100644 index 000000000..9940ac6a9 --- /dev/null +++ b/client/src/app/+video-studio/shared/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './video-studio.service' | |||
diff --git a/client/src/app/+video-editor/shared/video-editor.service.ts b/client/src/app/+video-studio/shared/video-studio.service.ts index 5b7053039..8d8b2f0e5 100644 --- a/client/src/app/+video-editor/shared/video-editor.service.ts +++ b/client/src/app/+video-studio/shared/video-studio.service.ts | |||
@@ -4,19 +4,19 @@ import { Injectable } from '@angular/core' | |||
4 | import { RestExtractor } from '@app/core' | 4 | import { RestExtractor } from '@app/core' |
5 | import { objectToFormData } from '@app/helpers' | 5 | import { objectToFormData } from '@app/helpers' |
6 | import { VideoService } from '@app/shared/shared-main' | 6 | import { VideoService } from '@app/shared/shared-main' |
7 | import { VideoEditorCreateEdition, VideoEditorTask } from '@shared/models' | 7 | import { VideoStudioCreateEdition, VideoStudioTask } from '@shared/models' |
8 | 8 | ||
9 | @Injectable() | 9 | @Injectable() |
10 | export class VideoEditorService { | 10 | export class VideoStudioService { |
11 | 11 | ||
12 | constructor ( | 12 | constructor ( |
13 | private authHttp: HttpClient, | 13 | private authHttp: HttpClient, |
14 | private restExtractor: RestExtractor | 14 | private restExtractor: RestExtractor |
15 | ) {} | 15 | ) {} |
16 | 16 | ||
17 | editVideo (videoId: number | string, tasks: VideoEditorTask[]) { | 17 | editVideo (videoId: number | string, tasks: VideoStudioTask[]) { |
18 | const url = VideoService.BASE_VIDEO_URL + '/' + videoId + '/editor/edit' | 18 | const url = VideoService.BASE_VIDEO_URL + '/' + videoId + '/studio/edit' |
19 | const body: VideoEditorCreateEdition = { | 19 | const body: VideoStudioCreateEdition = { |
20 | tasks | 20 | tasks |
21 | } | 21 | } |
22 | 22 | ||
diff --git a/client/src/app/+video-studio/video-studio-routing.module.ts b/client/src/app/+video-studio/video-studio-routing.module.ts new file mode 100644 index 000000000..bcd9b79a5 --- /dev/null +++ b/client/src/app/+video-studio/video-studio-routing.module.ts | |||
@@ -0,0 +1,29 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | import { VideoStudioEditComponent, VideoStudioEditResolver } from './edit' | ||
4 | |||
5 | const videoStudioRoutes: Routes = [ | ||
6 | { | ||
7 | path: '', | ||
8 | children: [ | ||
9 | { | ||
10 | path: 'edit/:videoId', | ||
11 | component: VideoStudioEditComponent, | ||
12 | data: { | ||
13 | meta: { | ||
14 | title: $localize`Studio` | ||
15 | } | ||
16 | }, | ||
17 | resolve: { | ||
18 | video: VideoStudioEditResolver | ||
19 | } | ||
20 | } | ||
21 | ] | ||
22 | } | ||
23 | ] | ||
24 | |||
25 | @NgModule({ | ||
26 | imports: [ RouterModule.forChild(videoStudioRoutes) ], | ||
27 | exports: [ RouterModule ] | ||
28 | }) | ||
29 | export class VideoStudioRoutingModule {} | ||
diff --git a/client/src/app/+video-studio/video-studio.module.ts b/client/src/app/+video-studio/video-studio.module.ts new file mode 100644 index 000000000..1a8763539 --- /dev/null +++ b/client/src/app/+video-studio/video-studio.module.ts | |||
@@ -0,0 +1,27 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { SharedFormModule } from '@app/shared/shared-forms' | ||
3 | import { SharedMainModule } from '@app/shared/shared-main' | ||
4 | import { VideoStudioEditComponent, VideoStudioEditResolver } from './edit' | ||
5 | import { VideoStudioService } from './shared' | ||
6 | import { VideoStudioRoutingModule } from './video-studio-routing.module' | ||
7 | |||
8 | @NgModule({ | ||
9 | imports: [ | ||
10 | VideoStudioRoutingModule, | ||
11 | |||
12 | SharedMainModule, | ||
13 | SharedFormModule | ||
14 | ], | ||
15 | |||
16 | declarations: [ | ||
17 | VideoStudioEditComponent | ||
18 | ], | ||
19 | |||
20 | exports: [], | ||
21 | |||
22 | providers: [ | ||
23 | VideoStudioService, | ||
24 | VideoStudioEditResolver | ||
25 | ] | ||
26 | }) | ||
27 | export class VideoStudioModule { } | ||
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts index 6e8a64f46..af26ea04d 100644 --- a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts +++ b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts | |||
@@ -35,7 +35,7 @@ export class ActionButtonsComponent implements OnInit, OnChanges { | |||
35 | playlist: false, | 35 | playlist: false, |
36 | download: true, | 36 | download: true, |
37 | update: true, | 37 | update: true, |
38 | editor: true, | 38 | studio: true, |
39 | blacklist: true, | 39 | blacklist: true, |
40 | delete: true, | 40 | delete: true, |
41 | report: true, | 41 | report: true, |
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index cd499845b..a831da099 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts | |||
@@ -144,8 +144,8 @@ const routes: Routes = [ | |||
144 | }, | 144 | }, |
145 | 145 | ||
146 | { | 146 | { |
147 | path: 'video-editor', | 147 | path: 'studio', |
148 | loadChildren: () => import('./+video-editor/video-editor.module').then(m => m.VideoEditorModule), | 148 | loadChildren: () => import('./+video-studio/video-studio.module').then(m => m.VideoStudioModule), |
149 | canActivateChild: [ MetaGuard ] | 149 | canActivateChild: [ MetaGuard ] |
150 | }, | 150 | }, |
151 | 151 | ||
diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts index d1b36f347..a2367166e 100644 --- a/client/src/app/shared/shared-main/users/user-notification.model.ts +++ b/client/src/app/shared/shared-main/users/user-notification.model.ts | |||
@@ -228,7 +228,7 @@ export class UserNotification implements UserNotificationServer { | |||
228 | this.pluginQueryParams.pluginType = this.plugin.type + '' | 228 | this.pluginQueryParams.pluginType = this.plugin.type + '' |
229 | break | 229 | break |
230 | 230 | ||
231 | case UserNotificationType.MY_VIDEO_EDITION_FINISHED: | 231 | case UserNotificationType.MY_VIDEO_STUDIO_EDITION_FINISHED: |
232 | this.videoUrl = this.buildVideoUrl(this.video) | 232 | this.videoUrl = this.buildVideoUrl(this.video) |
233 | break | 233 | break |
234 | } | 234 | } |
diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.html b/client/src/app/shared/shared-main/users/user-notifications.component.html index ff1259fb8..e7cdb0183 100644 --- a/client/src/app/shared/shared-main/users/user-notifications.component.html +++ b/client/src/app/shared/shared-main/users/user-notifications.component.html | |||
@@ -207,7 +207,7 @@ | |||
207 | </div> | 207 | </div> |
208 | </ng-container> | 208 | </ng-container> |
209 | 209 | ||
210 | <ng-container *ngSwitchCase="19"> <!-- UserNotificationType.MY_VIDEO_EDITION_FINISHED --> | 210 | <ng-container *ngSwitchCase="19"> <!-- UserNotificationType.MY_VIDEO_STUDIO_EDITION_FINISHED --> |
211 | <my-global-icon iconName="film" aria-hidden="true"></my-global-icon> | 211 | <my-global-icon iconName="film" aria-hidden="true"></my-global-icon> |
212 | 212 | ||
213 | <div class="message" i18n> | 213 | <div class="message" i18n> |
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index 612fcf16c..2d4db9a28 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts | |||
@@ -228,8 +228,8 @@ export class Video implements VideoServerModel { | |||
228 | return user && this.isLocal === true && (this.account.name === user.username || user.hasRight(UserRight.UPDATE_ANY_VIDEO)) | 228 | return user && this.isLocal === true && (this.account.name === user.username || user.hasRight(UserRight.UPDATE_ANY_VIDEO)) |
229 | } | 229 | } |
230 | 230 | ||
231 | isEditableBy (user: AuthUser, videoEditorEnabled: boolean) { | 231 | isEditableBy (user: AuthUser, videoStudioEnabled: boolean) { |
232 | return videoEditorEnabled && | 232 | return videoStudioEnabled && |
233 | this.state?.id === VideoState.PUBLISHED && | 233 | this.state?.id === VideoState.PUBLISHED && |
234 | this.isUpdatableBy(user) | 234 | this.isUpdatableBy(user) |
235 | } | 235 | } |
diff --git a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts index 29a711378..5eef96145 100644 --- a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts | |||
@@ -29,7 +29,7 @@ export type VideoActionsDisplayType = { | |||
29 | liveInfo?: boolean | 29 | liveInfo?: boolean |
30 | removeFiles?: boolean | 30 | removeFiles?: boolean |
31 | transcoding?: boolean | 31 | transcoding?: boolean |
32 | editor?: boolean | 32 | studio?: boolean |
33 | } | 33 | } |
34 | 34 | ||
35 | @Component({ | 35 | @Component({ |
@@ -61,7 +61,7 @@ export class VideoActionsDropdownComponent implements OnChanges { | |||
61 | liveInfo: false, | 61 | liveInfo: false, |
62 | removeFiles: false, | 62 | removeFiles: false, |
63 | transcoding: false, | 63 | transcoding: false, |
64 | editor: true | 64 | studio: true |
65 | } | 65 | } |
66 | @Input() placement = 'left' | 66 | @Input() placement = 'left' |
67 | 67 | ||
@@ -153,7 +153,7 @@ export class VideoActionsDropdownComponent implements OnChanges { | |||
153 | } | 153 | } |
154 | 154 | ||
155 | isVideoEditable () { | 155 | isVideoEditable () { |
156 | return this.video.isEditableBy(this.user, this.serverService.getHTMLConfig().videoEditor.enabled) | 156 | return this.video.isEditableBy(this.user, this.serverService.getHTMLConfig().videoStudio.enabled) |
157 | } | 157 | } |
158 | 158 | ||
159 | isVideoRemovable () { | 159 | isVideoRemovable () { |
@@ -337,10 +337,10 @@ export class VideoActionsDropdownComponent implements OnChanges { | |||
337 | isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.update && this.isVideoUpdatable() | 337 | isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.update && this.isVideoUpdatable() |
338 | }, | 338 | }, |
339 | { | 339 | { |
340 | label: $localize`Editor`, | 340 | label: $localize`Studio`, |
341 | linkBuilder: ({ video }) => [ '/video-editor/edit', video.uuid ], | 341 | linkBuilder: ({ video }) => [ '/studio/edit', video.uuid ], |
342 | iconName: 'film', | 342 | iconName: 'film', |
343 | isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.editor && this.isVideoEditable() | 343 | isDisplayed: () => this.authService.isLoggedIn() && this.displayOptions.studio && this.isVideoEditable() |
344 | }, | 344 | }, |
345 | { | 345 | { |
346 | label: $localize`Block`, | 346 | label: $localize`Block`, |