diff options
author | Nikolay G <crushoverdrive@mail.ru> | 2023-02-17 20:51:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 20:51:50 +0300 |
commit | f30bd109f7573472c288280b28abb7dd9d30ac7f (patch) | |
tree | 247d01d84268d0211f426b0dba30c410e7247797 /ui/src/app/app.component.html | |
parent | Update README.md (diff) | |
parent | Merge pull request #219 from PikuZheng/patch-1 (diff) | |
download | metube-f30bd109f7573472c288280b28abb7dd9d30ac7f.tar.gz metube-f30bd109f7573472c288280b28abb7dd9d30ac7f.tar.bz2 metube-f30bd109f7573472c288280b28abb7dd9d30ac7f.zip |
Merge branch 'master' into master
Diffstat (limited to 'ui/src/app/app.component.html')
-rw-r--r-- | ui/src/app/app.component.html | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html index 74425aa..4807064 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 (click)="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> @@ -106,6 +117,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> @@ -118,11 +130,14 @@ <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="{{buildDownloadLink(download.value)}}" download><fa-icon [icon]="faDownload"></fa-icon></a> </td> <td> <a href="{{download.value.url}}" target="_blank"><fa-icon [icon]="faExternalLinkAlt"></fa-icon></a> |