[AAE-4430] Upload from local tab visibility with info icon error message (#6592)

* [AAE-4430] Upload from local tab visibility with info icon error message

* Fix restore deleted site e2e
This commit is contained in:
arditdomi
2021-02-04 17:44:33 +01:00
committed by GitHub
parent d362153e37
commit 37a3f25123
5 changed files with 32 additions and 30 deletions

View File

@@ -146,4 +146,17 @@ export class ContentNodeSelectorComponent implements OnInit {
return this.data?.showLocalUploadButton;
}
getWarningMessage(): string {
return this.showingSearch ? 'NODE_SELECTOR.UPLOAD_BUTTON_SEARCH_WARNING_MESSAGE' :
(this.hasNoPermissionToUpload() ? 'NODE_SELECTOR.UPLOAD_BUTTON_PERMISSION_WARNING_MESSAGE' : '');
}
hasNoPermissionToUpload(): boolean {
return (!this.hasAllowableOperations && !this.showingSearch) && !this.isLoading;
}
hasUploadError(): boolean {
return this.showingSearch || this.hasNoPermissionToUpload();
}
}