diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-04 13:31:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-04 15:45:44 +0200 |
commit | 2989628b7913383b39ac34c7db8666a21f8e5037 (patch) | |
tree | ac7759177c04e524e7845143fd685aefb49e810e /client/src/app/+admin/config | |
parent | 8e08d415f9473b6b72fef698729453e726da16e7 (diff) | |
download | PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.gz PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.zst PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.zip |
Use HTML config when possible
Diffstat (limited to 'client/src/app/+admin/config')
5 files changed, 9 insertions, 13 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts index 01ff022c5..79a98f288 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts | |||
@@ -1,5 +1,3 @@ | |||
1 | |||
2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' | ||
3 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 2 | import { FormGroup } from '@angular/forms' |
5 | 3 | ||
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..bac1015fc 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' | |||
3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { MenuService } from '@app/core' | 5 | import { MenuService } from '@app/core' |
6 | import { ServerConfig } from '@shared/models' | 6 | import { HTMLServerConfig } from '@shared/models' |
7 | import { ConfigService } from '../shared/config.service' | 7 | import { ConfigService } from '../shared/config.service' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
@@ -15,7 +15,7 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { | |||
15 | @Input() form: FormGroup | 15 | @Input() form: FormGroup |
16 | @Input() formErrors: any | 16 | @Input() formErrors: any |
17 | 17 | ||
18 | @Input() serverConfig: ServerConfig | 18 | @Input() serverConfig: HTMLServerConfig |
19 | 19 | ||
20 | signupAlertMessage: string | 20 | signupAlertMessage: string |
21 | defaultLandingPageOptions: SelectOptionsItem[] = [] | 21 | defaultLandingPageOptions: SelectOptionsItem[] = [] |
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 cb65ca6e7..1e8cfb021 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 | |||
@@ -27,7 +27,7 @@ import { | |||
27 | import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators' | 27 | import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators' |
28 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 28 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
29 | import { CustomPageService } from '@app/shared/shared-main/custom-page' | 29 | import { CustomPageService } from '@app/shared/shared-main/custom-page' |
30 | import { CustomConfig, CustomPage, ServerConfig } from '@shared/models' | 30 | import { CustomConfig, CustomPage, HTMLServerConfig } from '@shared/models' |
31 | import { EditConfigurationService } from './edit-configuration.service' | 31 | import { EditConfigurationService } from './edit-configuration.service' |
32 | 32 | ||
33 | type ComponentCustomConfig = CustomConfig & { | 33 | type ComponentCustomConfig = CustomConfig & { |
@@ -43,7 +43,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
43 | activeNav: string | 43 | activeNav: string |
44 | 44 | ||
45 | customConfig: ComponentCustomConfig | 45 | customConfig: ComponentCustomConfig |
46 | serverConfig: ServerConfig | 46 | serverConfig: HTMLServerConfig |
47 | 47 | ||
48 | homepage: CustomPage | 48 | homepage: CustomPage |
49 | 49 | ||
@@ -64,9 +64,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
64 | } | 64 | } |
65 | 65 | ||
66 | ngOnInit () { | 66 | ngOnInit () { |
67 | this.serverConfig = this.serverService.getTmpConfig() | 67 | this.serverConfig = this.serverService.getHTMLConfig() |
68 | this.serverService.getConfig() | ||
69 | .subscribe(config => this.serverConfig = config) | ||
70 | 68 | ||
71 | const formGroupData: { [key in keyof ComponentCustomConfig ]: any } = { | 69 | const formGroupData: { [key in keyof ComponentCustomConfig ]: any } = { |
72 | instance: { | 70 | instance: { |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts index 72372ffac..d4892a571 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' | 2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' |
3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { ServerConfig } from '@shared/models' | 5 | import { HTMLServerConfig } from '@shared/models' |
6 | import { ConfigService } from '../shared/config.service' | 6 | import { ConfigService } from '../shared/config.service' |
7 | import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' | 7 | import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' |
8 | 8 | ||
@@ -14,7 +14,7 @@ import { EditConfigurationService, ResolutionOption } from './edit-configuration | |||
14 | export class EditLiveConfigurationComponent implements OnInit, OnChanges { | 14 | export class EditLiveConfigurationComponent implements OnInit, OnChanges { |
15 | @Input() form: FormGroup | 15 | @Input() form: FormGroup |
16 | @Input() formErrors: any | 16 | @Input() formErrors: any |
17 | @Input() serverConfig: ServerConfig | 17 | @Input() serverConfig: HTMLServerConfig |
18 | 18 | ||
19 | transcodingThreadOptions: SelectOptionsItem[] = [] | 19 | transcodingThreadOptions: SelectOptionsItem[] = [] |
20 | transcodingProfiles: SelectOptionsItem[] = [] | 20 | transcodingProfiles: SelectOptionsItem[] = [] |
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 b017dd08c..3397c3dbd 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 | |||
@@ -2,7 +2,7 @@ | |||
2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' | 2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' |
3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { ServerConfig } from '@shared/models' | 5 | import { HTMLServerConfig } from '@shared/models' |
6 | import { ConfigService } from '../shared/config.service' | 6 | import { ConfigService } from '../shared/config.service' |
7 | import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' | 7 | import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' |
8 | 8 | ||
@@ -14,7 +14,7 @@ import { EditConfigurationService, ResolutionOption } from './edit-configuration | |||
14 | export class EditVODTranscodingComponent implements OnInit, OnChanges { | 14 | export class EditVODTranscodingComponent implements OnInit, OnChanges { |
15 | @Input() form: FormGroup | 15 | @Input() form: FormGroup |
16 | @Input() formErrors: any | 16 | @Input() formErrors: any |
17 | @Input() serverConfig: ServerConfig | 17 | @Input() serverConfig: HTMLServerConfig |
18 | 18 | ||
19 | transcodingThreadOptions: SelectOptionsItem[] = [] | 19 | transcodingThreadOptions: SelectOptionsItem[] = [] |
20 | transcodingProfiles: SelectOptionsItem[] = [] | 20 | transcodingProfiles: SelectOptionsItem[] = [] |