|
|
|
@ -16,7 +16,7 @@ |
|
|
|
|
|
|
|
import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from '@angular/core'; |
|
|
|
import { Subject } from 'rxjs'; |
|
|
|
import { select, Store } from '@ngrx/store'; |
|
|
|
import { Store } from '@ngrx/store'; |
|
|
|
import { AppState } from '@core/core.state'; |
|
|
|
import { TranslateService } from '@ngx-translate/core'; |
|
|
|
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; |
|
|
|
@ -29,10 +29,10 @@ import { |
|
|
|
ResourceTypeMIMETypes, |
|
|
|
ResourceTypeTranslationMap |
|
|
|
} from '@shared/models/resource.models'; |
|
|
|
import { filter, startWith, take, takeUntil } from 'rxjs/operators'; |
|
|
|
import { filter, startWith, takeUntil } from 'rxjs/operators'; |
|
|
|
import { ActionNotificationShow } from '@core/notification/notification.actions'; |
|
|
|
import { isDefinedAndNotNull } from '@core/utils'; |
|
|
|
import { selectMaxResourceSize } from '@core/auth/auth.selectors'; |
|
|
|
import { getCurrentAuthState } from '@core/auth/auth.selectors'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'tb-resources-library', |
|
|
|
@ -44,7 +44,7 @@ export class ResourcesLibraryComponent extends EntityComponent<Resource> impleme |
|
|
|
readonly resourceTypes: ResourceType[] = Object.values(this.resourceType); |
|
|
|
readonly resourceTypesTranslationMap = ResourceTypeTranslationMap; |
|
|
|
|
|
|
|
maxResourceSize = 0; |
|
|
|
maxResourceSize = getCurrentAuthState(this.store).maxResourceSize; |
|
|
|
|
|
|
|
private destroy$ = new Subject<void>(); |
|
|
|
|
|
|
|
@ -55,11 +55,6 @@ export class ResourcesLibraryComponent extends EntityComponent<Resource> impleme |
|
|
|
public fb: FormBuilder, |
|
|
|
protected cd: ChangeDetectorRef) { |
|
|
|
super(store, fb, entityValue, entitiesTableConfigValue, cd); |
|
|
|
this.store.pipe(select(selectMaxResourceSize)).pipe( |
|
|
|
take(1) |
|
|
|
).subscribe(maxResourceSize => { |
|
|
|
this.maxResourceSize = maxResourceSize; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
|