mirror of
https://github.com/alexta69/metube.git
synced 2025-04-04 20:57:45 +03:00
Merge pull request #517 from DallasHoff/rwd-improvements
Responsive design improvements
This commit is contained in:
commit
0b37d39ff9
2 changed files with 112 additions and 104 deletions
|
@ -23,7 +23,7 @@
|
||||||
data-bs-display="static">
|
data-bs-display="static">
|
||||||
<fa-icon [icon]="activeTheme.icon"></fa-icon>
|
<fa-icon [icon]="activeTheme.icon"></fa-icon>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="theme-select">
|
<ul class="dropdown-menu dropdown-menu-end position-absolute" aria-labelledby="theme-select">
|
||||||
<li *ngFor="let theme of themes">
|
<li *ngFor="let theme of themes">
|
||||||
<button type="button" class="dropdown-item d-flex align-items-center" [ngClass]="{'active' : activeTheme == theme}" (click)="themeChanged(theme)">
|
<button type="button" class="dropdown-item d-flex align-items-center" [ngClass]="{'active' : activeTheme == theme}" (click)="themeChanged(theme)">
|
||||||
<span class="me-2 opacity-50">
|
<span class="me-2 opacity-50">
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 add-url-component">
|
<div class="col-md-6 col-lg-3 add-url-component">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Quality</span>
|
<span class="input-group-text">Quality</span>
|
||||||
<select class="form-select" name="quality" [(ngModel)]="quality" (change)="qualityChanged()" [disabled]="addInProgress || downloads.loading">
|
<select class="form-select" name="quality" [(ngModel)]="quality" (change)="qualityChanged()" [disabled]="addInProgress || downloads.loading">
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 add-url-component">
|
<div class="col-md-6 col-lg-3 add-url-component">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Format</span>
|
<span class="input-group-text">Format</span>
|
||||||
<select class="form-select" name="format" [(ngModel)]="format" (change)="formatChanged()" [disabled]="addInProgress || downloads.loading">
|
<select class="form-select" name="format" [(ngModel)]="format" (change)="formatChanged()" [disabled]="addInProgress || downloads.loading">
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 add-url-component">
|
<div class="col-md-6 col-lg-3 add-url-component">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Auto Start</span>
|
<span class="input-group-text">Auto Start</span>
|
||||||
<select class="form-select" name="autoStart" [(ngModel)]="autoStart" (change)="autoStartChanged()" [disabled]="addInProgress || downloads.loading">
|
<select class="form-select" name="autoStart" [(ngModel)]="autoStart" (change)="autoStartChanged()" [disabled]="addInProgress || downloads.loading">
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 add-url-component">
|
<div class="col-md-6 col-lg-3 add-url-component">
|
||||||
<div [attr.class]="showAdvanced() ? 'btn-group add-url-group' : 'add-url-group'" ngbDropdown #advancedDropdown="ngbDropdown" display="dynamic" placement="bottom-end">
|
<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">
|
<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>
|
<span class="spinner-border spinner-border-sm" role="status" id="add-spinner" *ngIf="addInProgress"></span>
|
||||||
|
@ -95,21 +95,21 @@
|
||||||
<input type="text" autocomplete="off" spellcheck="false" class="form-control" placeholder="Default" name="customNamePrefix" [(ngModel)]="customNamePrefix" [disabled]="addInProgress || downloads.loading">
|
<input type="text" autocomplete="off" spellcheck="false" class="form-control" placeholder="Default" name="customNamePrefix" [(ngModel)]="customNamePrefix" [disabled]="addInProgress || downloads.loading">
|
||||||
</div>
|
</div>
|
||||||
<div class="add-url-component">
|
<div class="add-url-component">
|
||||||
<div class="row align-items-center">
|
<div class="row align-items-center gy-2">
|
||||||
<div class="col-6">
|
<div class="col-12 col-md-6 order-md-2">
|
||||||
<div class="input-group ms-1">
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" name="playlistStrictMode" [(ngModel)]="playlistStrictMode" [disabled]="addInProgress || downloads.loading">
|
|
||||||
<label class="form-check-label">Strict Playlist mode</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Items limit</span>
|
<span class="input-group-text">Items limit</span>
|
||||||
<input type="number" min="0" autocomplete="off" class="form-control" placeholder="Default" name="playlistItemLimit" (keydown)="isNumber($event)" [(ngModel)]="playlistItemLimit" [disabled]="addInProgress || downloads.loading">
|
<input type="number" min="0" autocomplete="off" class="form-control" placeholder="Default" name="playlistItemLimit" (keydown)="isNumber($event)" [(ngModel)]="playlistItemLimit" [disabled]="addInProgress || downloads.loading">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12 col-md-6 order-md-1">
|
||||||
|
<div class="input-group ms-1">
|
||||||
|
<div class="form-check form-switch">
|
||||||
|
<input class="form-check-input" type="checkbox" role="switch" name="playlistStrictMode" [(ngModel)]="playlistStrictMode" [disabled]="addInProgress || downloads.loading">
|
||||||
|
<label class="form-check-label">Strict Playlist mode</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -123,96 +123,98 @@
|
||||||
<div *ngIf="downloads.loading" class="alert alert-info" role="alert">
|
<div *ngIf="downloads.loading" class="alert alert-info" role="alert">
|
||||||
Connecting to server...
|
Connecting to server...
|
||||||
</div>
|
</div>
|
||||||
<div class="metube-section-header">Downloading</div>
|
<div class="metube-section-header">Downloading</div>
|
||||||
<table class="table">
|
<div class="px-2 py-3 border-bottom">
|
||||||
<thead>
|
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #queueDelSelected (click)="delSelectedDownloads('queue')"><fa-icon [icon]="faTrashAlt"></fa-icon> Cancel selected</button>
|
||||||
<tr>
|
</div>
|
||||||
<th scope="col" style="width: 1rem;">
|
<div class="overflow-auto">
|
||||||
<app-master-checkbox #queueMasterCheckbox [id]="'queue'" [list]="downloads.queue" (changed)="queueSelectionChanged($event)"></app-master-checkbox>
|
<table class="table">
|
||||||
</th>
|
<thead>
|
||||||
<th scope="col">
|
<tr>
|
||||||
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #queueDelSelected (click)="delSelectedDownloads('queue')"><fa-icon [icon]="faTrashAlt"></fa-icon> Cancel selected</button>
|
<th scope="col" style="width: 1rem;">
|
||||||
</th>
|
<app-master-checkbox #queueMasterCheckbox [id]="'queue'" [list]="downloads.queue" (changed)="queueSelectionChanged($event)"></app-master-checkbox>
|
||||||
<th scope="col" style="width: 14rem;"></th>
|
</th>
|
||||||
<th scope="col" style="width: 8rem;">Speed</th>
|
<th scope="col">Video</th>
|
||||||
<th scope="col" style="width: 7rem;">ETA</th>
|
<th scope="col" style="width: 8rem;">Speed</th>
|
||||||
<th scope="col" style="width: 2rem;"></th>
|
<th scope="col" style="width: 7rem;">ETA</th>
|
||||||
<th scope="col" style="width: 2rem;"></th>
|
<th scope="col" style="width: 6rem;"></th>
|
||||||
<th scope="col" style="width: 2rem;"></th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
<tr *ngFor="let download of downloads.queue | keyvalue: asIsOrder; trackBy: identifyDownloadRow" [class.disabled]='download.value.deleting'>
|
||||||
<tr *ngFor="let download of downloads.queue | keyvalue: asIsOrder; trackBy: identifyDownloadRow" [class.disabled]='download.value.deleting'>
|
<td>
|
||||||
<td>
|
<app-slave-checkbox [id]="download.key" [master]="queueMasterCheckbox" [checkable]="download.value"></app-slave-checkbox>
|
||||||
<app-slave-checkbox [id]="download.key" [master]="queueMasterCheckbox" [checkable]="download.value"></app-slave-checkbox>
|
</td>
|
||||||
</td>
|
<td title="{{ download.value.filename }}">
|
||||||
<td title="{{ download.value.filename }}">{{ download.value.title }}</td>
|
<div class="d-flex flex-column flex-sm-row align-items-center row-gap-2 column-gap-3">
|
||||||
<td><ngb-progressbar height="1.5rem" [showValue]="download.value.status != 'preparing'" [striped]="download.value.status == 'preparing'" [animated]="download.value.status == 'preparing'" type="success" [value]="download.value.status == 'preparing' ? 100 : download.value.percent | number:'1.0-0'"></ngb-progressbar></td>
|
<div>{{ download.value.title }}</div>
|
||||||
<td>{{ download.value.speed | speed }}</td>
|
<ngb-progressbar height="1.5rem" [showValue]="download.value.status != 'preparing'" [striped]="download.value.status == 'preparing'" [animated]="download.value.status == 'preparing'" type="success" [value]="download.value.status == 'preparing' ? 100 : download.value.percent | number:'1.0-0'" class="download-progressbar"></ngb-progressbar>
|
||||||
<td>{{ download.value.eta | eta }}</td>
|
</div>
|
||||||
<td>
|
</td>
|
||||||
<button *ngIf="download.value.status === 'pending'" type="button" class="btn btn-link" (click)="downloadItemByKey(download.key)"><fa-icon [icon]="faDownload"></fa-icon></button>
|
<td>{{ download.value.speed | speed }}</td>
|
||||||
</td>
|
<td>{{ download.value.eta | eta }}</td>
|
||||||
<td><button type="button" class="btn btn-link" (click)="delDownload('queue', download.key)"><fa-icon [icon]="faTrashAlt"></fa-icon></button></td>
|
<td>
|
||||||
<td><a href="{{download.value.url}}" target="_blank"><fa-icon [icon]="faExternalLinkAlt"></fa-icon></a></td>
|
<div class="d-flex">
|
||||||
</tr>
|
<button *ngIf="download.value.status === 'pending'" type="button" class="btn btn-link" (click)="downloadItemByKey(download.key)"><fa-icon [icon]="faDownload"></fa-icon></button>
|
||||||
</tbody>
|
<button type="button" class="btn btn-link" (click)="delDownload('queue', download.key)"><fa-icon [icon]="faTrashAlt"></fa-icon></button>
|
||||||
</table>
|
<a href="{{download.value.url}}" target="_blank" class="btn btn-link"><fa-icon [icon]="faExternalLinkAlt"></fa-icon></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="metube-section-header">Completed</div>
|
<div class="metube-section-header">Completed</div>
|
||||||
<table class="table">
|
<div class="px-2 py-3 border-bottom">
|
||||||
<thead>
|
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #doneDelSelected (click)="delSelectedDownloads('done')"><fa-icon [icon]="faTrashAlt"></fa-icon> Clear selected</button>
|
||||||
<tr>
|
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #doneClearCompleted (click)="clearCompletedDownloads()"><fa-icon [icon]="faCheckCircle"></fa-icon> Clear completed</button>
|
||||||
<th scope="col" style="width: 1rem;">
|
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #doneClearFailed (click)="clearFailedDownloads()"><fa-icon [icon]="faTimesCircle"></fa-icon> Clear failed</button>
|
||||||
<app-master-checkbox #doneMasterCheckbox [id]="'done'" [list]="downloads.done" (changed)="doneSelectionChanged($event)"></app-master-checkbox>
|
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #doneRetryFailed (click)="retryFailedDownloads()"><fa-icon [icon]="faRedoAlt"></fa-icon> Retry failed</button>
|
||||||
</th>
|
</div>
|
||||||
<th scope="col">
|
<div class="overflow-auto">
|
||||||
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #doneDelSelected (click)="delSelectedDownloads('done')"><fa-icon [icon]="faTrashAlt"></fa-icon> Clear selected</button>
|
<table class="table">
|
||||||
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #doneClearCompleted (click)="clearCompletedDownloads()"><fa-icon [icon]="faCheckCircle"></fa-icon> Clear completed</button>
|
<thead>
|
||||||
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #doneClearFailed (click)="clearFailedDownloads()"><fa-icon [icon]="faTimesCircle"></fa-icon> Clear failed</button>
|
<tr>
|
||||||
<button type="button" class="btn btn-link text-decoration-none px-0 me-4" disabled #doneRetryFailed (click)="retryFailedDownloads()"><fa-icon [icon]="faRedoAlt"></fa-icon> Retry failed</button>
|
<th scope="col" style="width: 1rem;">
|
||||||
</th>
|
<app-master-checkbox #doneMasterCheckbox [id]="'done'" [list]="downloads.done" (changed)="doneSelectionChanged($event)"></app-master-checkbox>
|
||||||
<th scope="col" >File Size</th>
|
</th>
|
||||||
<th scope="col" style="width: 2rem;"></th>
|
<th scope="col">Video</th>
|
||||||
<th scope="col" style="width: 2rem;"></th>
|
<th scope="col">File Size</th>
|
||||||
<th scope="col" style="width: 2rem;"></th>
|
<th scope="col" style="width: 8rem;"></th>
|
||||||
<th scope="col" style="width: 2rem;"></th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
<tr *ngFor="let download of downloads.done | keyvalue: asIsOrder; trackBy: identifyDownloadRow" [class.disabled]='download.value.deleting'>
|
||||||
<tr *ngFor="let download of downloads.done | keyvalue: asIsOrder; trackBy: identifyDownloadRow" [class.disabled]='download.value.deleting'>
|
<td>
|
||||||
<td>
|
<app-slave-checkbox [id]="download.key" [master]="doneMasterCheckbox" [checkable]="download.value"></app-slave-checkbox>
|
||||||
<app-slave-checkbox [id]="download.key" [master]="doneMasterCheckbox" [checkable]="download.value"></app-slave-checkbox>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<div style="display: inline-block; width: 1.5rem;">
|
||||||
<div style="display: inline-block; width: 1.5rem;">
|
<fa-icon *ngIf="download.value.status == 'finished'" [icon]="faCheckCircle" class="text-success"></fa-icon>
|
||||||
<fa-icon *ngIf="download.value.status == 'finished'" [icon]="faCheckCircle" class="text-success"></fa-icon>
|
<fa-icon *ngIf="download.value.status == 'error'" [icon]="faTimesCircle" class="text-danger"></fa-icon>
|
||||||
<fa-icon *ngIf="download.value.status == 'error'" [icon]="faTimesCircle" class="text-danger"></fa-icon>
|
</div>
|
||||||
</div>
|
<span ngbTooltip="{{download.value.msg}} | {{download.value.error}}"><a *ngIf="!!download.value.filename; else noDownloadLink" href="{{buildDownloadLink(download.value)}}" target="_blank">{{ download.value.title }}</a></span>
|
||||||
<span ngbTooltip="{{download.value.msg}} | {{download.value.error}}"><a *ngIf="!!download.value.filename; else noDownloadLink" href="{{buildDownloadLink(download.value)}}" target="_blank">{{ download.value.title }}</a></span>
|
<ng-template #noDownloadLink>
|
||||||
<ng-template #noDownloadLink>
|
{{download.value.title}}
|
||||||
{{download.value.title}}
|
<span *ngIf="download.value.msg"><br>{{download.value.msg}}</span>
|
||||||
<span *ngIf="download.value.msg"><br>{{download.value.msg}}</span>
|
<span *ngIf="download.value.error"><br>Error: {{download.value.error}}</span>
|
||||||
<span *ngIf="download.value.error"><br>Error: {{download.value.error}}</span>
|
</ng-template>
|
||||||
</ng-template>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<span *ngIf="download.value.size">{{ download.value.size | fileSize }}</span>
|
||||||
<span *ngIf="download.value.size">{{ download.value.size | fileSize }}</span>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<div class="d-flex">
|
||||||
<button *ngIf="download.value.status == 'error'" type="button" class="btn btn-link" (click)="retryDownload(download.key, download.value)"><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)"><fa-icon [icon]="faRedoAlt"></fa-icon></button>
|
||||||
</td>
|
<a *ngIf="download.value.filename" href="{{buildDownloadLink(download.value)}}" download class="btn btn-link"><fa-icon [icon]="faDownload"></fa-icon></a>
|
||||||
<td>
|
<a href="{{download.value.url}}" target="_blank" class="btn btn-link"><fa-icon [icon]="faExternalLinkAlt"></fa-icon></a>
|
||||||
<a *ngIf="download.value.filename" href="{{buildDownloadLink(download.value)}}" download><fa-icon [icon]="faDownload"></fa-icon></a>
|
<button type="button" class="btn btn-link" (click)="delDownload('done', download.key)"><fa-icon [icon]="faTrashAlt"></fa-icon></button>
|
||||||
</td>
|
</div>
|
||||||
<td>
|
</td>
|
||||||
<a href="{{download.value.url}}" target="_blank"><fa-icon [icon]="faExternalLinkAlt"></fa-icon></a>
|
</tr>
|
||||||
</td>
|
</tbody>
|
||||||
<td>
|
</table>
|
||||||
<button type="button" class="btn btn-link" (click)="delDownload('done', download.key)"><fa-icon [icon]="faTrashAlt"></fa-icon></button>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</main><!-- /.container -->
|
</main><!-- /.container -->
|
||||||
|
|
|
@ -17,6 +17,7 @@ button.add-url
|
||||||
|
|
||||||
.folder-dropdown-menu
|
.folder-dropdown-menu
|
||||||
width: 500px
|
width: 500px
|
||||||
|
max-width: calc(100vw - 3rem)
|
||||||
|
|
||||||
.folder-dropdown-menu .input-group
|
.folder-dropdown-menu .input-group
|
||||||
display: flex
|
display: flex
|
||||||
|
@ -48,6 +49,7 @@ th
|
||||||
border-top: 0
|
border-top: 0
|
||||||
border-bottom-width: 3px !important
|
border-bottom-width: 3px !important
|
||||||
vertical-align: middle !important
|
vertical-align: middle !important
|
||||||
|
white-space: nowrap
|
||||||
|
|
||||||
td
|
td
|
||||||
vertical-align: middle
|
vertical-align: middle
|
||||||
|
@ -59,3 +61,7 @@ td
|
||||||
.form-switch
|
.form-switch
|
||||||
input
|
input
|
||||||
margin-top: 5px
|
margin-top: 5px
|
||||||
|
|
||||||
|
.download-progressbar
|
||||||
|
width: 12rem
|
||||||
|
margin-left: auto
|
Loading…
Add table
Add a link
Reference in a new issue