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/shared/shared-forms | |
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/shared/shared-forms')
-rw-r--r-- | client/src/app/shared/shared-forms/preview-upload.component.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-forms/preview-upload.component.ts b/client/src/app/shared/shared-forms/preview-upload.component.ts index a55dcdd9a..edee6786d 100644 --- a/client/src/app/shared/shared-forms/preview-upload.component.ts +++ b/client/src/app/shared/shared-forms/preview-upload.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core' | |||
2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' | 2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' |
3 | import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser' | 3 | import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser' |
4 | import { ServerService } from '@app/core' | 4 | import { ServerService } from '@app/core' |
5 | import { ServerConfig } from '@shared/models' | 5 | import { HTMLServerConfig } from '@shared/models' |
6 | import { BytesPipe } from '../shared-main' | 6 | import { BytesPipe } from '../shared-main' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
@@ -27,7 +27,7 @@ export class PreviewUploadComponent implements OnInit, ControlValueAccessor { | |||
27 | allowedExtensionsMessage = '' | 27 | allowedExtensionsMessage = '' |
28 | maxSizeText: string | 28 | maxSizeText: string |
29 | 29 | ||
30 | private serverConfig: ServerConfig | 30 | private serverConfig: HTMLServerConfig |
31 | private bytesPipe: BytesPipe | 31 | private bytesPipe: BytesPipe |
32 | private file: Blob | 32 | private file: Blob |
33 | 33 | ||
@@ -52,9 +52,7 @@ export class PreviewUploadComponent implements OnInit, ControlValueAccessor { | |||
52 | } | 52 | } |
53 | 53 | ||
54 | ngOnInit () { | 54 | ngOnInit () { |
55 | this.serverConfig = this.serverService.getTmpConfig() | 55 | this.serverConfig = this.serverService.getHTMLConfig() |
56 | this.serverService.getConfig() | ||
57 | .subscribe(config => this.serverConfig = config) | ||
58 | 56 | ||
59 | this.allowedExtensionsMessage = this.videoImageExtensions.join(', ') | 57 | this.allowedExtensionsMessage = this.videoImageExtensions.join(', ') |
60 | } | 58 | } |