Add download link to downloaded file

This adds a simple download link that points to the downloaded file.

Note: This makes all files in the download directory (and its
sub-directory) available to any user.

Closes gh-26
This commit is contained in:
Steffen Klee
2021-12-13 22:35:19 +01:00
parent ddf258855d
commit fe4993153c
4 changed files with 11 additions and 1 deletions

View File

@@ -112,7 +112,8 @@
<fa-icon *ngIf="download.value.status == 'finished'" [icon]="faCheckCircle" style="color: green;"></fa-icon>
<fa-icon *ngIf="download.value.status == 'error'" [icon]="faTimesCircle" style="color: red;"></fa-icon>
</div>
<span ngbTooltip="{{download.value.msg}}">{{ download.value.title }}</span>
<span ngbTooltip="{{download.value.msg}}"><a *ngIf="!!download.value.filename; else noDownloadLink" href="download/{{download.value.filename}}" target="_blank">{{ download.value.title }}</a></span>
<ng-template #noDownloadLink>{{ download.value.title }}</ng-template>
</td>
<td>
<button *ngIf="download.value.status == 'error'" type="button" class="btn btn-link" (click)="retryDownload(download.key, download.value.quality)"><fa-icon [icon]="faRedoAlt"></fa-icon></button>

View File

@@ -15,6 +15,7 @@ interface Download {
url: string,
status: string;
msg: string;
filename: string;
quality: string;
percent: number;
speed: number;