aboutsummaryrefslogtreecommitdiff
path: root/ui/src
diff options
context:
space:
mode:
authorAlex <alexta69@gmail.com>2021-12-14 18:30:59 +0200
committerGitHub <noreply@github.com>2021-12-14 18:30:59 +0200
commit6a78c9bf60fa32d48fb4a9181c07f9293c79f2b7 (patch)
tree5ad3086b8f9eabeccdaf7ce9602d69cef3b36e86 /ui/src
parentfix sass syntax for dark mode (diff)
parentAdd download link to downloaded file (diff)
downloadmetube-6a78c9bf60fa32d48fb4a9181c07f9293c79f2b7.tar.gz
metube-6a78c9bf60fa32d48fb4a9181c07f9293c79f2b7.tar.bz2
metube-6a78c9bf60fa32d48fb4a9181c07f9293c79f2b7.zip
Merge pull request #88 from kleest/pr-download-link
Add download link to downloaded file
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/app/app.component.html3
-rw-r--r--ui/src/app/downloads.service.ts1
2 files changed, 3 insertions, 1 deletions
diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html
index 039aab6..1496bde 100644
--- a/ui/src/app/app.component.html
+++ b/ui/src/app/app.component.html
@@ -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>
diff --git a/ui/src/app/downloads.service.ts b/ui/src/app/downloads.service.ts
index e0db252..25bcccc 100644
--- a/ui/src/app/downloads.service.ts
+++ b/ui/src/app/downloads.service.ts
@@ -15,6 +15,7 @@ interface Download {
url: string,
status: string;
msg: string;
+ filename: string;
quality: string;
percent: number;
speed: number;
bgstack15