aboutsummaryrefslogtreecommitdiff
path: root/ui/src/app/app.component.html
diff options
context:
space:
mode:
authorAlex Shnitman <alexta69@gmail.com>2023-02-10 23:32:13 +0200
committerAlex Shnitman <alexta69@gmail.com>2023-02-10 23:32:13 +0200
commit50501f0aadf83f3d210a644167e41eda320b2e65 (patch)
tree4868a7c0ae2a061c137dc886383617fb104f38c5 /ui/src/app/app.component.html
parentAdded download button to the ui (diff)
parentupgrade dependencies (diff)
downloadmetube-50501f0aadf83f3d210a644167e41eda320b2e65.tar.gz
metube-50501f0aadf83f3d210a644167e41eda320b2e65.tar.bz2
metube-50501f0aadf83f3d210a644167e41eda320b2e65.zip
Merge remote-tracking branch 'origin/master' into download_to_device
Diffstat (limited to 'ui/src/app/app.component.html')
-rw-r--r--ui/src/app/app.component.html25
1 files changed, 18 insertions, 7 deletions
diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html
index 105dbc9..f8c62d9 100644
--- a/ui/src/app/app.component.html
+++ b/ui/src/app/app.component.html
@@ -26,7 +26,7 @@
<div class="container add-url-box">
<div class="row">
<div class="col add-url-component input-group">
- <input type="text" class="form-control" placeholder="Video or playlist URL" name="addUrl" [(ngModel)]="addUrl" [disabled]="addInProgress || downloads.loading">
+ <input type="text" autocomplete="off" spellcheck="false" class="form-control" placeholder="Video or playlist URL" name="addUrl" [(ngModel)]="addUrl" [disabled]="addInProgress || downloads.loading">
</div>
</div>
<div class="row">
@@ -47,10 +47,21 @@
</div>
</div>
<div class="col-md-3 add-url-component">
- <button class="btn btn-primary add-url" type="submit" (click)="addDownload()" [disabled]="addInProgress || downloads.loading">
- <span class="spinner-border spinner-border-sm" role="status" id="add-spinner" *ngIf="addInProgress"></span>
- {{ addInProgress ? "Adding..." : "Add" }}
- </button>
+ <div [attr.class]="showAdvanced() ? 'btn-group add-url-group' : 'add-url-group'" ngbDropdown #advancedDropdown="ngbDropdown" display="dynamic" placement="bottom-end">
+ <button class="btn btn-primary add-url" type="submit" (click)="addDownload()" [disabled]="addInProgress || downloads.loading">
+ <span class="spinner-border spinner-border-sm" role="status" id="add-spinner" *ngIf="addInProgress"></span>
+ {{ addInProgress ? "Adding..." : "Add" }}
+ </button>
+ <button class="btn btn-primary dropdown-toggle dropdown-toggle-split" id="advancedButton" type="button" title="Advanced options" [disabled]="addInProgress || downloads.loading" ngbDropdownAnchor (focus)="advancedDropdown.open()" *ngIf="showAdvanced()">
+ <span class="sr-only">Advanced options</span>
+ </button>
+ <div ngbDropdownMenu aria-labelledby="advancedButton" class="dropdown-menu dropdown-menu-end folder-dropdown-menu">
+ <div class="input-group">
+ <span class="input-group-text">Download Folder</span>
+ <ng-select [items]="customDirs$ | async" placeholder="Default" [addTag]="allowCustomDir.bind(this)" addTagText="Create directory" [ngStyle]="{'flex-grow':'1'}" bindLabel="folder" [(ngModel)]="folder" [disabled]="addInProgress || downloads.loading"></ng-select>
+ </div>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -119,11 +130,11 @@
<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}}"><a *ngIf="!!download.value.filename; else noDownloadLink" href="download/{{download.value.filename | encodeURIComponent}}" target="_blank">{{ download.value.title }}</a></span>
+ <span ngbTooltip="{{download.value.msg}}"><a *ngIf="!!download.value.filename; else noDownloadLink" href="{{buildDownloadLink(download.value)}}" 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.url, download.value.quality)"><fa-icon [icon]="faRedoAlt"></fa-icon></button>
+ <button *ngIf="download.value.status == 'error'" type="button" class="btn btn-link" (click)="retryDownload(download.key, download.value.url, download.value.quality, download.value.folder)"><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>
bgstack15