X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fconfig%2Fedit-custom-config%2Fedit-basic-configuration.component.ts;h=81457bd3672a2e191af606f51c7744d3cf1de6ee;hb=b13a0a48bacb53e65e665774e621326452045294;hp=74fdb87a18c663f3669b4115bb18a612769b13f0;hpb=1f256e7d3cf056c2d999260155cdba58ae1b878b;p=github%2FChocobozzz%2FPeerTube.git 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 74fdb87a1..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 @@ -3,7 +3,7 @@ import { SelectOptionsItem } from 'src/types/select-options-item.model' import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' import { FormGroup } from '@angular/forms' import { MenuService } from '@app/core' -import { ServerConfig } from '@shared/models' +import { HTMLServerConfig } from '@shared/models' import { ConfigService } from '../shared/config.service' @Component({ @@ -15,7 +15,7 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { @Input() form: FormGroup @Input() formErrors: any - @Input() serverConfig: ServerConfig + @Input() serverConfig: HTMLServerConfig signupAlertMessage: string defaultLandingPageOptions: SelectOptionsItem[] = [] @@ -36,6 +36,10 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { } } + countExternalAuth () { + return this.serverConfig.plugin.registeredExternalAuths.length + } + getVideoQuotaOptions () { return this.configService.videoQuotaOptions } @@ -82,6 +86,7 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { buildLandingPageOptions () { this.defaultLandingPageOptions = this.menuService.buildCommonLinks(this.serverConfig) + .links .map(o => ({ id: o.path, label: o.label, @@ -96,7 +101,7 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { .pipe(pairwise()) .subscribe(([ oldValue, newValue ]) => { if (oldValue !== true && newValue === true) { - // tslint:disable:max-line-length + /* eslint-disable max-len */ this.signupAlertMessage = $localize`You enabled signup: we automatically enabled the "Block new videos automatically" checkbox of the "Videos" section just below.` this.form.patchValue({