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/users/user-edit | |
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/users/user-edit')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-edit.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts index 2fc3c5d3b..ae1f79ba0 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/users/user-edit/user-edit.ts | |||
@@ -3,7 +3,7 @@ import { ConfigService } from '@app/+admin/config/shared/config.service' | |||
3 | import { AuthService, ScreenService, ServerService, User } from '@app/core' | 3 | import { AuthService, ScreenService, ServerService, User } from '@app/core' |
4 | import { FormReactive } from '@app/shared/shared-forms' | 4 | import { FormReactive } from '@app/shared/shared-forms' |
5 | import { USER_ROLE_LABELS } from '@shared/core-utils/users' | 5 | import { USER_ROLE_LABELS } from '@shared/core-utils/users' |
6 | import { ServerConfig, UserAdminFlag, UserRole, VideoResolution } from '@shared/models' | 6 | import { HTMLServerConfig, UserAdminFlag, UserRole, VideoResolution } from '@shared/models' |
7 | import { SelectOptionsItem } from '../../../../types/select-options-item.model' | 7 | import { SelectOptionsItem } from '../../../../types/select-options-item.model' |
8 | 8 | ||
9 | @Directive() | 9 | @Directive() |
@@ -16,7 +16,7 @@ export abstract class UserEdit extends FormReactive implements OnInit { | |||
16 | 16 | ||
17 | roles: { value: string, label: string }[] = [] | 17 | roles: { value: string, label: string }[] = [] |
18 | 18 | ||
19 | protected serverConfig: ServerConfig | 19 | protected serverConfig: HTMLServerConfig |
20 | 20 | ||
21 | protected abstract serverService: ServerService | 21 | protected abstract serverService: ServerService |
22 | protected abstract configService: ConfigService | 22 | protected abstract configService: ConfigService |
@@ -26,9 +26,7 @@ export abstract class UserEdit extends FormReactive implements OnInit { | |||
26 | abstract getFormButtonTitle (): string | 26 | abstract getFormButtonTitle (): string |
27 | 27 | ||
28 | ngOnInit (): void { | 28 | ngOnInit (): void { |
29 | this.serverConfig = this.serverService.getTmpConfig() | 29 | this.serverConfig = this.serverService.getHTMLConfig() |
30 | this.serverService.getConfig() | ||
31 | .subscribe(config => this.serverConfig = config) | ||
32 | 30 | ||
33 | this.buildRoles() | 31 | this.buildRoles() |
34 | } | 32 | } |