Added ability to download archives from the archive viewer

This commit is contained in:
Tzahi12345
2023-04-01 03:14:17 -04:00
parent 0e15fd7193
commit 763ce5d28b
3 changed files with 27 additions and 7 deletions

View File

@@ -139,6 +139,13 @@ export class ArchiveViewerComponent {
}
}
downloadArchive(): void {
this.postsService.downloadArchive(this.type === 'both' ? null : this.type, this.sub_id === 'none' ? null : this.sub_id).subscribe(res => {
const blob: Blob = res;
saveAs(blob, 'archive.txt');
});
}
openDeleteSelectedArchivesDialog(): void {
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
data: {