aboutsummaryrefslogtreecommitdiff
path: root/ui/src
diff options
context:
space:
mode:
authorCavazzaTommaso <tommaso.cavazza@studenti.univr.it>2022-09-01 11:12:55 +0200
committerCavazzaTommaso <tommaso.cavazza@studenti.univr.it>2022-09-01 11:12:55 +0200
commit2a227bc760e553a17bee1799f22b46802483d9d8 (patch)
treebc0e55fa86aaffa29adae136449af884b9611fca /ui/src
parentupgraded yt-dlp (diff)
downloadmetube-2a227bc760e553a17bee1799f22b46802483d9d8.tar.gz
metube-2a227bc760e553a17bee1799f22b46802483d9d8.tar.bz2
metube-2a227bc760e553a17bee1799f22b46802483d9d8.zip
Added download button to the ui
For personal needs, I've added the download button to the completed downloads
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/app/app.component.html6
-rw-r--r--ui/src/app/app.component.ts3
2 files changed, 7 insertions, 2 deletions
diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html
index 74425aa..105dbc9 100644
--- a/ui/src/app/app.component.html
+++ b/ui/src/app/app.component.html
@@ -1,6 +1,6 @@
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<div class="container-fluid">
- <a class="navbar-brand" href="#">MeTube</a>
+ <a class="navbar-brand" href="#">Youtube downloader</a>
<!--
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsDefault" aria-controls="navbarsDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
@@ -106,6 +106,7 @@
<th scope="col" style="width: 2rem;"></th>
<th scope="col" style="width: 2rem;"></th>
<th scope="col" style="width: 2rem;"></th>
+ <th scope="col" style="width: 2rem;"></th>
</tr>
</thead>
<tbody>
@@ -125,6 +126,9 @@
<button *ngIf="download.value.status == 'error'" type="button" class="btn btn-link" (click)="retryDownload(download.key, download.value.url, download.value.quality)"><fa-icon [icon]="faRedoAlt"></fa-icon></button>
</td>
<td>
+ <a *ngIf="!!download.value.filename; else noDownloadLink" href="download/{{download.value.filename | encodeURIComponent}}" download target="_blank"><fa-icon [icon]="faDownload"></fa-icon></a>
+ </td>
+ <td>
<a href="{{download.value.url}}" target="_blank"><fa-icon [icon]="faExternalLinkAlt"></fa-icon></a>
</td>
<td>
diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts
index a9b46a3..3b6d804 100644
--- a/ui/src/app/app.component.ts
+++ b/ui/src/app/app.component.ts
@@ -1,6 +1,6 @@
import { Component, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
import { faTrashAlt, faCheckCircle, faTimesCircle } from '@fortawesome/free-regular-svg-icons';
-import { faRedoAlt, faSun, faMoon, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
+import { faRedoAlt, faSun, faMoon, faExternalLinkAlt, faDownload } from '@fortawesome/free-solid-svg-icons';
import { CookieService } from 'ngx-cookie-service';
import { DownloadsService, Status } from './downloads.service';
@@ -34,6 +34,7 @@ export class AppComponent implements AfterViewInit {
faRedoAlt = faRedoAlt;
faSun = faSun;
faMoon = faMoon;
+ faDownload = faDownload;
faExternalLinkAlt = faExternalLinkAlt;
constructor(public downloads: DownloadsService, private cookieService: CookieService) {
bgstack15