[ACA-3266] Improve version upload component (#5750)

* added new component to compare current and new file version of a node.

* update doc

* added more tests

* updated docs

* small fixes

* changed with typography

* Update version-comparison.component.md

* handle hiding the comparison component on demo shell if cancelled/uploaded a new file version

* small fixes

Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
Urse Daniel
2020-06-04 15:01:11 +03:00
committed by GitHub
parent 13066a9a32
commit f0df6b3a5f
16 changed files with 317 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ export class VersionManagerDialogAdapterComponent {
showComments = true;
allowDownload = true;
readOnly = false;
showVersionComparison = false;
constructor(@Inject(MAT_DIALOG_DATA) data: any,
private snackBar: MatSnackBar,
@@ -43,10 +44,17 @@ export class VersionManagerDialogAdapterComponent {
}
uploadError(errorMessage: string) {
this.snackBar.open(errorMessage, '', { duration: 4000 });
this.snackBar.open(errorMessage, '', {duration: 4000});
}
close() {
this.containingDialog.close();
}
hideVersionComparison(isCancelled: boolean | Node) {
if (isCancelled) {
this.showVersionComparison = false;
this.newFileVersion = null;
}
}
}