2019-11-29 19:31:34 +02:00
< nav class = "navbar navbar-expand-md navbar-dark bg-dark" >
< a class = "navbar-brand" href = "#" > MeTube< / a >
2019-12-03 22:32:07 +02:00
<!--
2019-11-29 19:31:34 +02:00
< 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 >
< / button >
< div class = "collapse navbar-collapse" id = "navbarsDefault" >
< ul class = "navbar-nav mr-auto" >
< li class = "nav-item active" >
< a class = "nav-link" href = "#" > Home < span class = "sr-only" > (current)< / span > < / a >
< / li >
< / ul >
< / div >
-->
< / nav >
< main role = "main" class = "container" >
< form # f = "ngForm" >
2021-09-13 20:25:32 +03:00
< 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 " >
< / div >
< / div >
< div class = "row" >
< div class = "col-md-5 add-url-component" >
< div class = "input-group" >
< div class = "input-group-prepend" >
2021-10-30 18:17:13 +01:00
< span class = "input-group-text" > Quality< / span >
2021-09-13 20:25:32 +03:00
< / div >
2021-10-30 18:17:13 +01:00
< select class = "custom-select" name = "quality" [ ( ngModel ) ] = " quality " ( change ) = " qualityChanged ( ) " [ disabled ] = " addInProgress | | downloads . loading " >
2021-11-03 21:57:34 +00:00
< option * ngFor = "let q of qualities" [ ngValue ] = " q " > {{ q.text }}< / option >
2021-09-13 20:25:32 +03:00
< / select >
< / div >
< / div >
< div class = "col-md-4 add-url-component" >
< div class = "input-group" >
< div class = "input-group-prepend" >
2021-10-30 18:17:13 +01:00
< span class = "input-group-text" > Format< / span >
2021-09-13 20:25:32 +03:00
< / div >
2021-10-30 18:17:13 +01:00
< select class = "custom-select" name = "format" [ ( ngModel ) ] = " format " ( change ) = " formatChanged ( ) " [ disabled ] = " addInProgress | | downloads . loading " >
< option * ngFor = "let f of formats" [ ngValue ] = " f . id " > {{ f.text }}< / option >
2021-09-13 20:25:32 +03:00
< / select >
< / 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 >
2019-11-29 19:31:34 +02:00
< / div >
< / div >
< / form >
2019-12-06 14:16:19 +02:00
< div * ngIf = "downloads.loading" class = "alert alert-info" role = "alert" >
Connecting to server...
< / div >
< div class = "metube-section-header" > Downloading< / div >
2019-12-03 22:32:07 +02:00
< table class = "table" >
< thead >
2019-11-29 19:31:34 +02:00
< tr >
2019-12-03 22:32:07 +02:00
< th scope = "col" style = "width: 1rem;" >
< app-master-checkbox # queueMasterCheckbox [ id ] = " ' queue ' " [ list ] = " downloads . queue " ( changed ) = " queueSelectionChanged ( $ event ) " > < / app-master-checkbox >
2021-07-29 11:12:40 +03:00
< / th >
2019-11-29 19:31:34 +02:00
< th scope = "col" >
2019-12-03 22:32:07 +02:00
< button type = "button" class = "btn btn-link px-0 mr-4" disabled # queueDelSelected ( click ) = " delSelectedDownloads ( ' queue ' ) " > < fa-icon [ icon ] = " faTrashAlt " > < / fa-icon > Cancel selected< / button >
2019-11-29 19:31:34 +02:00
< / th >
< th scope = "col" style = "width: 14rem;" > < / th >
< th scope = "col" style = "width: 8rem;" > Speed< / th >
< th scope = "col" style = "width: 7rem;" > ETA< / th >
< th scope = "col" style = "width: 2rem;" > < / th >
< / tr >
2019-12-03 22:32:07 +02:00
< / thead >
< tbody >
< tr * ngFor = "let download of downloads.queue | keyvalue: asIsOrder" [ class . disabled ] = ' download . value . deleting ' >
2019-11-29 19:31:34 +02:00
< td >
2019-12-03 22:32:07 +02:00
< app-slave-checkbox [ id ] = " download . key " [ master ] = " queueMasterCheckbox " [ checkable ] = " download . value " > < / app-slave-checkbox >
2019-11-29 19:31:34 +02:00
< / td >
< td > {{ download.value.title }}< / td >
< 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 >
< td > {{ download.value.speed | speed }}< / td >
< td > {{ download.value.eta | eta }}< / td >
2019-12-03 22:32:07 +02:00
< td > < button type = "button" class = "btn btn-link" ( click ) = " delDownload ( ' queue ' , download . key ) " > < fa-icon [ icon ] = " faTrashAlt " > < / fa-icon > < / button > < / td >
2019-11-29 19:31:34 +02:00
< / tr >
2019-12-03 22:32:07 +02:00
< / tbody >
< / table >
< div class = "metube-section-header" > Completed< / div >
< table class = "table" >
< thead >
< tr >
< th scope = "col" style = "width: 1rem;" >
< app-master-checkbox # doneMasterCheckbox [ id ] = " ' done ' " [ list ] = " downloads . done " ( changed ) = " doneSelectionChanged ( $ event ) " > < / app-master-checkbox >
2021-07-29 11:12:40 +03:00
< / th >
2019-12-03 22:32:07 +02:00
< th scope = "col" >
< button type = "button" class = "btn btn-link px-0 mr-4" disabled # doneDelSelected ( click ) = " delSelectedDownloads ( ' done ' ) " > < fa-icon [ icon ] = " faTrashAlt " > < / fa-icon > Clear selected< / button >
< button type = "button" class = "btn btn-link px-0 mr-4" disabled # doneClearCompleted ( click ) = " clearCompletedDownloads ( ) " > < fa-icon [ icon ] = " faCheckCircle " > < / fa-icon > Clear completed< / button >
< button type = "button" class = "btn btn-link px-0 mr-4" disabled # doneClearFailed ( click ) = " clearFailedDownloads ( ) " > < fa-icon [ icon ] = " faTimesCircle " > < / fa-icon > Clear failed< / button >
< / th >
< th scope = "col" style = "width: 2rem;" > < / th >
2021-07-29 11:12:40 +03:00
< th scope = "col" style = "width: 2rem;" > < / th >
2019-12-03 22:32:07 +02:00
< / tr >
< / thead >
< tbody >
< tr * ngFor = "let download of downloads.done | keyvalue: asIsOrder" [ class . disabled ] = ' download . value . deleting ' >
< td >
< app-slave-checkbox [ id ] = " download . key " [ master ] = " doneMasterCheckbox " [ checkable ] = " download . value " > < / app-slave-checkbox >
< / td >
< td >
2019-12-06 16:30:07 +02:00
< div style = "display: inline-block; width: 1.5rem;" >
2019-12-03 22:32:07 +02:00
< 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 >
2019-12-06 16:30:07 +02:00
< span ngbTooltip = "{{download.value.msg}}" > {{ download.value.title }}< / span >
2019-12-03 22:32:07 +02:00
< / td >
2021-07-29 11:12:40 +03:00
< 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 >
< / td >
< td >
< button type = "button" class = "btn btn-link" ( click ) = " delDownload ( ' done ' , download . key ) " > < fa-icon [ icon ] = " faTrashAlt " > < / fa-icon > < / button >
< / td >
2019-12-03 22:32:07 +02:00
< / tr >
< / tbody >
< / table >
2021-07-29 11:12:40 +03:00
2019-11-29 19:31:34 +02:00
< / main > <!-- /.container -->