aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html5
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts7
-rw-r--r--client/src/app/core/server/server.service.ts3
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.scss1
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.ts2
5 files changed, 16 insertions, 2 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
index 13b43306b..0a032df12 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
@@ -108,6 +108,11 @@
108 i18n-labelText labelText="Video import with HTTP enabled" 108 i18n-labelText labelText="Video import with HTTP enabled"
109 ></my-peertube-checkbox> 109 ></my-peertube-checkbox>
110 110
111 <my-peertube-checkbox
112 inputName="importVideosTorrentEnabled" formControlName="importVideosTorrentEnabled"
113 i18n-labelText labelText="Video import with a torrent file or a magnet URI enabled"
114 ></my-peertube-checkbox>
115
111 <div i18n class="inner-form-title">Administrator</div> 116 <div i18n class="inner-form-title">Administrator</div>
112 117
113 <div class="form-group"> 118 <div class="form-group">
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 bc5ce6e5d..fd6784415 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
@@ -72,6 +72,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
72 signupEnabled: null, 72 signupEnabled: null,
73 signupLimit: this.customConfigValidatorsService.SIGNUP_LIMIT, 73 signupLimit: this.customConfigValidatorsService.SIGNUP_LIMIT,
74 importVideosHttpEnabled: null, 74 importVideosHttpEnabled: null,
75 importVideosTorrentEnabled: null,
75 adminEmail: this.customConfigValidatorsService.ADMIN_EMAIL, 76 adminEmail: this.customConfigValidatorsService.ADMIN_EMAIL,
76 userVideoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, 77 userVideoQuota: this.userValidatorsService.USER_VIDEO_QUOTA,
77 transcodingThreads: this.customConfigValidatorsService.TRANSCODING_THREADS, 78 transcodingThreads: this.customConfigValidatorsService.TRANSCODING_THREADS,
@@ -189,6 +190,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
189 videos: { 190 videos: {
190 http: { 191 http: {
191 enabled: this.form.value['importVideosHttpEnabled'] 192 enabled: this.form.value['importVideosHttpEnabled']
193 },
194 torrent: {
195 enabled: this.form.value['importVideosTorrentEnabled']
192 } 196 }
193 } 197 }
194 } 198 }
@@ -231,7 +235,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
231 transcodingEnabled: this.customConfig.transcoding.enabled, 235 transcodingEnabled: this.customConfig.transcoding.enabled,
232 customizationJavascript: this.customConfig.instance.customizations.javascript, 236 customizationJavascript: this.customConfig.instance.customizations.javascript,
233 customizationCSS: this.customConfig.instance.customizations.css, 237 customizationCSS: this.customConfig.instance.customizations.css,
234 importVideosHttpEnabled: this.customConfig.import.videos.http.enabled 238 importVideosHttpEnabled: this.customConfig.import.videos.http.enabled,
239 importVideosTorrentEnabled: this.customConfig.import.videos.torrent.enabled
235 } 240 }
236 241
237 for (const resolution of this.resolutions) { 242 for (const resolution of this.resolutions) {
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index ab317f0aa..52b50cbe8 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -73,6 +73,9 @@ export class ServerService {
73 videos: { 73 videos: {
74 http: { 74 http: {
75 enabled: false 75 enabled: false
76 },
77 torrent: {
78 enabled: false
76 } 79 }
77 } 80 }
78 } 81 }
diff --git a/client/src/app/videos/+video-edit/video-add.component.scss b/client/src/app/videos/+video-edit/video-add.component.scss
index 443361f50..c1f96cc37 100644
--- a/client/src/app/videos/+video-edit/video-add.component.scss
+++ b/client/src/app/videos/+video-edit/video-add.component.scss
@@ -50,6 +50,7 @@ $background-color: #F7F7F7;
50 border-radius: 3px; 50 border-radius: 3px;
51 width: 100%; 51 width: 100%;
52 min-height: 440px; 52 min-height: 440px;
53 padding-bottom: 20px;
53 display: flex; 54 display: flex;
54 justify-content: center; 55 justify-content: center;
55 align-items: center; 56 align-items: center;
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 7d360598d..1a9247dbe 100644
--- a/client/src/app/videos/+video-edit/video-add.component.ts
+++ b/client/src/app/videos/+video-edit/video-add.component.ts
@@ -40,6 +40,6 @@ export class VideoAddComponent implements CanComponentDeactivate {
40 } 40 }
41 41
42 isVideoImportTorrentEnabled () { 42 isVideoImportTorrentEnabled () {
43 return this.serverService.getConfig().import.videos.http.enabled 43 return this.serverService.getConfig().import.videos.torrent.enabled
44 } 44 }
45} 45}