[ADF-4640] share dialog fixes (#4830)

* unshare fixes and error notifications

* fix disabled toggles issue

* code fixes and separate interface

* remove 'isFavorite' include

* safety checks for properties

* update e2e

* refactor test after functionality change

* fix issue with the missing properties

* safety checks
This commit is contained in:
Denys Vuika
2019-06-12 17:21:23 +01:00
committed by GitHub
parent 3a2cfb3626
commit f64cd9cffd
7 changed files with 112 additions and 37 deletions

View File

@@ -28,7 +28,8 @@ import {
AlfrescoApiService, AuthenticationService, AppConfigService, AppConfigValues, ContentService, TranslationService,
FileUploadEvent, FolderCreatedEvent, LogService, NotificationService,
UploadService, DataColumn, DataRow, UserPreferencesService,
PaginationComponent, FormValues, DisplayMode, InfinitePaginationComponent, HighlightDirective
PaginationComponent, FormValues, DisplayMode, InfinitePaginationComponent, HighlightDirective,
SharedLinksApiService
} from '@alfresco/adf-core';
import {
@@ -217,7 +218,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
@Optional() private route: ActivatedRoute,
public authenticationService: AuthenticationService,
public alfrescoApiService: AlfrescoApiService,
private contentMetadataService: ContentMetadataService) {
private contentMetadataService: ContentMetadataService,
private sharedLinksApiService: SharedLinksApiService) {
}
showFile(event) {
@@ -275,6 +277,12 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
.subscribe((err: { message: string }) => {
this.notificationService.showError(err.message);
});
this.sharedLinksApiService.error
.pipe(takeUntil(this.onDestroy$))
.subscribe((err: { message: string }) => {
this.notificationService.showError(err.message);
});
}
ngOnDestroy() {