diff options
author | Wicklow <123956049+wickloww@users.noreply.github.com> | 2023-04-07 08:09:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-07 10:09:54 +0200 |
commit | b302c80dc0d9ba8eabef9ef6576efe36afc57584 (patch) | |
tree | 14d406b41291805deb94a36a5e79f8d6989355f8 /client | |
parent | 9258e9a4a37911fc64b5faada2a7e604bd1ede1f (diff) | |
download | PeerTube-b302c80dc0d9ba8eabef9ef6576efe36afc57584.tar.gz PeerTube-b302c80dc0d9ba8eabef9ef6576efe36afc57584.tar.zst PeerTube-b302c80dc0d9ba8eabef9ef6576efe36afc57584.zip |
feature/ability to disable video history by default (#5728)
* draft: ability to disable video history by default
* Update configuration and add tests
* Updated code based on review comments
* Add tests on registration and video quota
* Remove required video quotas in query
* Fix tests
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html | 11 | ||||
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html index 8399b5d56..9fc332308 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html | |||
@@ -246,6 +246,17 @@ | |||
246 | 246 | ||
247 | <div *ngIf="formErrors.user.videoQuotaDaily" class="form-error">{{ formErrors.user.videoQuotaDaily }}</div> | 247 | <div *ngIf="formErrors.user.videoQuotaDaily" class="form-error">{{ formErrors.user.videoQuotaDaily }}</div> |
248 | </div> | 248 | </div> |
249 | <div class="form-group"> | ||
250 | <ng-container formGroupName="history"> | ||
251 | <ng-container formGroupName="videos"> | ||
252 | <my-peertube-checkbox | ||
253 | inputName="videosHistoryEnabled" formControlName="enabled" | ||
254 | i18n-labelText labelText="Automatically enable video history for new users" | ||
255 | > | ||
256 | </my-peertube-checkbox> | ||
257 | </ng-container> | ||
258 | </ng-container> | ||
259 | </div> | ||
249 | </ng-container> | 260 | </ng-container> |
250 | 261 | ||
251 | </div> | 262 | </div> |
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 2afe80a03..0526ed8f1 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 | |||
@@ -165,6 +165,11 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
165 | enabled: null | 165 | enabled: null |
166 | }, | 166 | }, |
167 | user: { | 167 | user: { |
168 | history: { | ||
169 | videos: { | ||
170 | enabled: null | ||
171 | } | ||
172 | }, | ||
168 | videoQuota: USER_VIDEO_QUOTA_VALIDATOR, | 173 | videoQuota: USER_VIDEO_QUOTA_VALIDATOR, |
169 | videoQuotaDaily: USER_VIDEO_QUOTA_DAILY_VALIDATOR | 174 | videoQuotaDaily: USER_VIDEO_QUOTA_DAILY_VALIDATOR |
170 | }, | 175 | }, |