aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-02-11 10:51:33 +0100
committerChocobozzz <chocobozzz@cpy.re>2022-02-28 10:42:19 +0100
commitc729caf6cc34630877a0e5a1bda1719384cd0c8a (patch)
tree1d2e13722e518c73d2c9e6f0969615e29d51cf8c /client/src/app/+admin
parenta24bf4dc659cebb65d887862bf21d7a35e9ec791 (diff)
downloadPeerTube-c729caf6cc34630877a0e5a1bda1719384cd0c8a.tar.gz
PeerTube-c729caf6cc34630877a0e5a1bda1719384cd0c8a.tar.zst
PeerTube-c729caf6cc34630877a0e5a1bda1719384cd0c8a.zip
Add basic video editor support
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts3
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html25
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts9
-rw-r--r--client/src/app/+admin/overview/videos/video-list.component.scss1
4 files changed, 38 insertions, 0 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 f2eaa3033..e3b6f8305 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
@@ -197,6 +197,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
197 resolutions: {} 197 resolutions: {}
198 } 198 }
199 }, 199 },
200 videoEditor: {
201 enabled: null
202 },
200 autoBlacklist: { 203 autoBlacklist: {
201 videos: { 204 videos: {
202 ofUsers: { 205 ofUsers: {
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 1158f027b..2be855756 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
@@ -192,4 +192,29 @@
192 192
193 </div> 193 </div>
194 </div> 194 </div>
195
196 <div class="form-row mt-2"> <!-- video editor grid -->
197 <div class="form-group col-12 col-lg-4 col-xl-3">
198 <div i18n class="inner-form-title">VIDEO EDITOR</div>
199 <div i18n class="inner-form-description">
200 Allows your users to edit their video (cut, add intro/outro, add a watermark etc)
201 </div>
202 </div>
203
204 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
205
206 <ng-container formGroupName="videoEditor">
207 <div class="form-group" [ngClass]="getTranscodingDisabledClass()">
208 <my-peertube-checkbox
209 inputName="videoEditorEnabled" formControlName="enabled"
210 i18n-labelText labelText="Enable video editor"
211 >
212 <ng-container ngProjectAs="description" *ngIf="!isTranscodingEnabled()">
213 <span i18n>⚠️ You need to enable transcoding first to enable video editor</span>
214 </ng-container>
215 </my-peertube-checkbox>
216 </div>
217 </ng-container>
218 </div>
219 </div>
195</ng-container> 220</ng-container>
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 3397c3dbd..948c10b69 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
@@ -71,6 +71,8 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges {
71 } 71 }
72 72
73 private checkTranscodingFields () { 73 private checkTranscodingFields () {
74 const transcodingControl = this.form.get('transcoding.enabled')
75 const videoEditorControl = this.form.get('videoEditor.enabled')
74 const hlsControl = this.form.get('transcoding.hls.enabled') 76 const hlsControl = this.form.get('transcoding.hls.enabled')
75 const webtorrentControl = this.form.get('transcoding.webtorrent.enabled') 77 const webtorrentControl = this.form.get('transcoding.webtorrent.enabled')
76 78
@@ -95,5 +97,12 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges {
95 webtorrentControl.enable() 97 webtorrentControl.enable()
96 } 98 }
97 }) 99 })
100
101 transcodingControl.valueChanges
102 .subscribe(newValue => {
103 if (newValue === false) {
104 videoEditorControl.setValue(false)
105 }
106 })
98 } 107 }
99} 108}
diff --git a/client/src/app/+admin/overview/videos/video-list.component.scss b/client/src/app/+admin/overview/videos/video-list.component.scss
index 543cb433c..616b9bc6b 100644
--- a/client/src/app/+admin/overview/videos/video-list.component.scss
+++ b/client/src/app/+admin/overview/videos/video-list.component.scss
@@ -1,5 +1,6 @@
1@use '_variables' as *; 1@use '_variables' as *;
2@use '_mixins' as *; 2@use '_mixins' as *;
3
3my-embed { 4my-embed {
4 display: block; 5 display: block;
5 max-width: 500px; 6 max-width: 500px;