diff options
Diffstat (limited to 'client/src/app/+admin')
3 files changed, 47 insertions, 1 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 318c8e2c2..c9533208a 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 | |||
@@ -56,6 +56,36 @@ | |||
56 | </ng-container> | 56 | </ng-container> |
57 | </div> | 57 | </div> |
58 | 58 | ||
59 | <ng-container formGroupName="client"> | ||
60 | |||
61 | <ng-container formGroupName="videos"> | ||
62 | <ng-container formGroupName="miniature"> | ||
63 | <div class="form-group"> | ||
64 | <my-peertube-checkbox | ||
65 | inputName="clientVideosMiniaturePreferAuthorDisplayName" formControlName="preferAuthorDisplayName" | ||
66 | i18n-labelText labelText="Prefer author display name in video miniature" | ||
67 | ></my-peertube-checkbox> | ||
68 | </div> | ||
69 | </ng-container> | ||
70 | </ng-container> | ||
71 | |||
72 | <ng-container formGroupName="menu"> | ||
73 | <ng-container formGroupName="login"> | ||
74 | <div class="form-group"> | ||
75 | <my-peertube-checkbox | ||
76 | inputName="clientMenuLoginRedirectOnSingleExternalAuth" formControlName="redirectOnSingleExternalAuth" | ||
77 | i18n-labelText labelText="Redirect users on single external auth when users click on the login button in menu" | ||
78 | > | ||
79 | <ng-container ngProjectAs="description"> | ||
80 | <span *ngIf="countExternalAuth() === 0" i18n>⚠️ You don't have any external auth plugin enabled.</span> | ||
81 | <span *ngIf="countExternalAuth() > 1" i18n>⚠️ You have multiple external auth plugins enabled.</span> | ||
82 | </ng-container> | ||
83 | </my-peertube-checkbox> | ||
84 | </div> | ||
85 | </ng-container> | ||
86 | </ng-container> | ||
87 | </ng-container> | ||
88 | |||
59 | </div> | 89 | </div> |
60 | </div> | 90 | </div> |
61 | 91 | ||
@@ -276,7 +306,7 @@ | |||
276 | <div class="form-group col-12 col-lg-4 col-xl-3"> | 306 | <div class="form-group col-12 col-lg-4 col-xl-3"> |
277 | <div i18n class="inner-form-title">VIDEO CHANNELS</div> | 307 | <div i18n class="inner-form-title">VIDEO CHANNELS</div> |
278 | </div> | 308 | </div> |
279 | 309 | ||
280 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | 310 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
281 | <div class="form-group" formGroupName="videoChannels"> | 311 | <div class="form-group" formGroupName="videoChannels"> |
282 | <label i18n for="videoChannelsMaxPerUser">Max video channels per user</label> | 312 | <label i18n for="videoChannelsMaxPerUser">Max video channels per user</label> |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts index 7a8258820..81457bd36 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts | |||
@@ -36,6 +36,10 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | countExternalAuth () { | ||
40 | return this.serverConfig.plugin.registeredExternalAuths.length | ||
41 | } | ||
42 | |||
39 | getVideoQuotaOptions () { | 43 | getVideoQuotaOptions () { |
40 | return this.configService.videoQuotaOptions | 44 | return this.configService.videoQuotaOptions |
41 | } | 45 | } |
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 fdb0a7532..f2eaa3033 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 | |||
@@ -106,6 +106,18 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
106 | whitelisted: null | 106 | whitelisted: null |
107 | } | 107 | } |
108 | }, | 108 | }, |
109 | client: { | ||
110 | videos: { | ||
111 | miniature: { | ||
112 | preferAuthorDisplayName: null | ||
113 | } | ||
114 | }, | ||
115 | menu: { | ||
116 | login: { | ||
117 | redirectOnSingleExternalAuth: null | ||
118 | } | ||
119 | } | ||
120 | }, | ||
109 | cache: { | 121 | cache: { |
110 | previews: { | 122 | previews: { |
111 | size: CACHE_PREVIEWS_SIZE_VALIDATOR | 123 | size: CACHE_PREVIEWS_SIZE_VALIDATOR |