mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-18 02:30:55 +03:00
Fixed issue where restoring a DB backup would cause backup_local_db task to be stuck running
Slightly updated tasks UI
This commit is contained in:
@@ -31,14 +31,18 @@ export class RestoreDbDialogComponent implements OnInit {
|
||||
}
|
||||
|
||||
restoreClicked(): void {
|
||||
this.restoring = true;
|
||||
if (this.selected_backup.length !== 1) return;
|
||||
this.postsService.restoreDBBackup(this.selected_backup[0]).subscribe(res => {
|
||||
this.restoring = false;
|
||||
if (res['success']) {
|
||||
this.postsService.openSnackBar('Database successfully restored!');
|
||||
this.dialogRef.close();
|
||||
} else {
|
||||
this.postsService.openSnackBar('Failed to restore database! See logs for more info.');
|
||||
}
|
||||
}, err => {
|
||||
this.restoring = false;
|
||||
this.postsService.openSnackBar('Failed to restore database! See browser console for more info.');
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user