diff --git a/mediarepo-ui/src/app/components/shared/app-common/busy-dialog/busy-dialog.component.ts b/mediarepo-ui/src/app/components/shared/app-common/busy-dialog/busy-dialog.component.ts index 2e330b4..d422f31 100644 --- a/mediarepo-ui/src/app/components/shared/app-common/busy-dialog/busy-dialog.component.ts +++ b/mediarepo-ui/src/app/components/shared/app-common/busy-dialog/busy-dialog.component.ts @@ -23,13 +23,18 @@ export class BusyDialogComponent { public progress = 0; public mode: ProgressBarMode = "indeterminate"; - constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) data: BusyDialogData) { + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) data: BusyDialogData + ) { this.title = data.title; if (data.message) { data.message.subscribe(m => this.message = m); } if (data.progress) { - data.progress.subscribe(p => this.progress = p); + data.progress.subscribe(p => { + this.progress = Math.floor(p * 100); + }); this.mode = "determinate"; } this.allowCancel = data.allowCancel ?? false; diff --git a/mediarepo-ui/src/app/components/shared/file/file-context-menu/file-context-menu.component.ts b/mediarepo-ui/src/app/components/shared/file/file-context-menu/file-context-menu.component.ts index ebf0cf1..90a2151 100644 --- a/mediarepo-ui/src/app/components/shared/file/file-context-menu/file-context-menu.component.ts +++ b/mediarepo-ui/src/app/components/shared/file/file-context-menu/file-context-menu.component.ts @@ -3,18 +3,10 @@ import {File} from "../../../../../api/models/File"; import {ContextMenuComponent} from "../../app-common/context-menu/context-menu.component"; import {FileService} from "../../../../services/file/file.service"; import {LoggingService} from "../../../../services/logging/logging.service"; -import {MatDialog, MatDialogRef} from "@angular/material/dialog"; -import {BusyDialogComponent} from "../../app-common/busy-dialog/busy-dialog.component"; -import {BehaviorSubject} from "rxjs"; +import {MatDialog} from "@angular/material/dialog"; import {FileActionBaseComponent} from "../../app-base/file-action-base/file-action-base.component"; import {FileStatus} from "../../../../../api/api-types/files"; -type ProgressDialogContext = { - dialog: MatDialogRef, - progress: BehaviorSubject, - message: BehaviorSubject, -}; - @Component({ selector: "app-file-context-menu", templateUrl: "./file-context-menu.component.html",