delete downloadl, typo fix, thumbs up/down

This commit is contained in:
Timo 2021-03-24 09:13:24 +02:00
parent c5ebbd2eac
commit e2ccd3d47f
5 changed files with 39 additions and 3 deletions

View File

@ -1,3 +1,4 @@
\
<section>
<div class="page-header">
<div class="actions flex-1">
@ -57,6 +58,15 @@
>
</redaction-circle-button>
<redaction-circle-button
(action)="deleteItem(download)"
tooltip="downloads-list.actions.delete"
tooltipPosition="before"
type="dark-bg"
icon="red:trash"
>
</redaction-circle-button>
<ng-container *ngIf="download.inProgress">
<mat-spinner diameter="15"></mat-spinner>
</ng-container>

View File

@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { FileDownloadService } from '../../upload-download/file-download.service';
import { DownloadStatusWrapper } from '../../upload-download/model/download-status.wrapper';
import { DownloadControllerService } from '@redaction/red-ui-http';
@Component({
selector: 'redaction-downloads-list-screen',
@ -8,7 +9,7 @@ import { DownloadStatusWrapper } from '../../upload-download/model/download-stat
styleUrls: ['./downloads-list-screen.component.scss']
})
export class DownloadsListScreenComponent implements OnInit {
constructor(public readonly fileDownloadService: FileDownloadService) {}
constructor(public readonly fileDownloadService: FileDownloadService, private readonly _downloadControllerService: DownloadControllerService) {}
ngOnInit(): void {
this.fileDownloadService.getDownloadStatus().subscribe();
@ -18,7 +19,13 @@ export class DownloadsListScreenComponent implements OnInit {
return this.fileDownloadService.downloads.length === 0;
}
public downloadItem(download: DownloadStatusWrapper) {
this.fileDownloadService.performDownload(download);
public async downloadItem(download: DownloadStatusWrapper) {
await this.fileDownloadService.performDownload(download);
}
deleteItem(download: DownloadStatusWrapper) {
this._downloadControllerService
.deleteDownload({ storageId: download.storageId })
.subscribe(() => this.fileDownloadService.getDownloadStatus().subscribe());
}
}

View File

@ -859,6 +859,7 @@
"status": "Status"
},
"actions": {
"delete": "Delete",
"download": "Download"
}
},

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="100px" height="100px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg">
<title>false_positive</title>
<g id="false_positive" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path
d="M70.0540046,8 L70.0540046,13 L18.1476125,13 C13.6557132,13 9.16381388,16.5 8.16561403,21 L0.180015248,61 C-0.319084676,64 0.180015248,67 2.17641494,69.5 C4.17281464,71.5 7.16741418,73 10.1620137,73 L23.1386117,73 C18.6467124,78.5 18.1476125,86 22.1404119,91.5 C24.6359115,95.5 29.1278108,98 34.1188101,98 C38.1116095,98 42.1044088,96.5 44.5999085,93.5 L65.0630053,73 L70.0540046,73 L70.0540046,78 L100,78 L100,8 L70.0540046,8 Z M61.0702059,63 L37.6125095,86.5 C36.6143097,87.5 35.6161098,88 34.1188101,88 C32.6215103,88 31.1242105,87 30.1260107,86 C28.6287109,84 29.1278108,81 31.1242105,79 L47.0954081,63 L10.1620137,63 L18.1476125,23 L70.0540046,23 L70.0540046,63 L61.0702059,63 Z M90.0180015,68 L80.036003,68 L80.036003,18 L90.0180015,18 L90.0180015,68 Z"
id="Shape" fill="currentColor" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="100px" height="100px" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg">
<title>false_negative</title>
<g id="false_negative" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path
d="M29.9459954,92 L29.9459954,87 L81.8523875,87 C86.3442868,87 90.8361861,83.5 91.834386,79 L99.8199848,39 C100.319085,36 99.8199848,33 97.8235851,30.5 C95.8271854,28.5 92.8325858,27 89.8379863,27 L76.8613883,27 C81.3532876,21.5 81.8523875,14 77.8595881,8.5 C75.3640885,4.5 70.8721892,2 65.8811899,2 C61.8883905,2 57.8955912,3.5 55.4000915,6.5 L34.9369947,27 L29.9459954,27 L29.9459954,22 L0,22 L0,92 L29.9459954,92 Z M38.9297941,37 L62.3874905,13.5 C63.3856903,12.5 64.3838902,12 65.8811899,12 C67.3784897,12 68.8757895,13 69.8739893,14 C71.3712891,16 70.8721892,19 68.8757895,21 L52.9045919,37 L89.8379863,37 L81.8523875,77 L29.9459954,77 L29.9459954,37 L38.9297941,37 Z M9.98199848,32 L19.963997,32 L19.963997,82 L9.98199848,82 L9.98199848,32 Z"
id="Shape" fill="currentColor" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB