2023-10-01 15:25:11 +02:00
< nav class = "navbar navbar-expand-md navbar-dark" >
2022-06-23 23:30:09 +03:00
< div class = "container-fluid" >
2023-02-10 23:35:09 +02:00
< a class = "navbar-brand" href = "#" > MeTube< / a >
2022-06-23 23:30:09 +03: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 >
2021-12-17 18:35:43 +02:00
< / button >
2022-06-23 23:30:09 +03:00
< 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 >
-->
2023-10-01 15:25:11 +02:00
< div class = "navbar-nav ms-auto" >
< div class = "nav-item dropdown" >
< button class = "btn btn-link nav-link py-2 px-0 px-sm-2 dropdown-toggle d-flex align-items-center"
id="theme-select"
type="button"
aria-expanded="false"
data-bs-toggle="dropdown"
data-bs-display="static">
< fa-icon [ icon ] = " activeTheme . icon " > < / fa-icon >
< / button >
< ul class = "dropdown-menu dropdown-menu-end" aria-labelledby = "theme-select" >
< li * ngFor = "let theme of themes" >
< button type = "button" class = "dropdown-item d-flex align-items-center" [ ngClass ] = " { ' active ' : activeTheme = = theme } " ( click ) = " themeChanged ( theme ) " >
< span class = "me-2 opacity-50" >
< fa-icon [ icon ] = " theme . icon " > < / fa-icon >
< / span >
{{ theme.displayName }}
< span class = "ms-auto" [ ngClass ] = " { ' d-none ' : activeTheme ! = theme } " >
< fa-icon [ icon ] = " faCheck " > < / fa-icon >
< / span >
< / button >
< / li >
< / ul >
< / div >
2022-06-23 23:30:09 +03:00
< / div >
2021-12-16 21:52:56 +00:00
< / div >
2019-11-29 19:31:34 +02:00
< / nav >
2022-06-23 23:30:09 +03:00
< main role = "main" class = "container container-xl" >
2019-11-29 19:31:34 +02:00
< 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" >
2022-08-30 08:40:01 +08:00
< input type = "text" autocomplete = "off" spellcheck = "false" class = "form-control" placeholder = "Video or playlist URL" name = "addUrl" [ ( ngModel ) ] = " addUrl " [ disabled ] = " addInProgress | | downloads . loading " >
2021-09-13 20:25:32 +03:00
< / div >
< / div >
< div class = "row" >
< div class = "col-md-5 add-url-component" >
< div class = "input-group" >
2022-06-23 23:30:09 +03:00
< span class = "input-group-text" > Quality< / span >
< select class = "form-select" name = "quality" [ ( ngModel ) ] = " quality " ( change ) = " qualityChanged ( ) " [ disabled ] = " addInProgress | | downloads . loading " >
2021-11-19 17:57:43 +00:00
< option * ngFor = "let q of qualities" [ ngValue ] = " q . id " > {{ 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" >
2022-06-23 23:30:09 +03:00
< span class = "input-group-text" > Format< / span >
< select class = "form-select" name = "format" [ ( ngModel ) ] = " format " ( change ) = " formatChanged ( ) " [ disabled ] = " addInProgress | | downloads . loading " >
2021-10-30 18:17:13 +01:00
< 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" >
2022-08-30 01:29:55 -04:00
< div [ attr . class ] = " showAdvanced ( ) ? ' btn-group add-url-group ' : ' add-url-group ' " ngbDropdown # advancedDropdown = "ngbDropdown" display = "dynamic" placement = "bottom-end" >
2022-08-29 19:02:00 -04:00
< 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 >
2023-02-12 09:29:17 +08:00
< 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()" >
2022-08-29 20:27:34 -04:00
< span class = "sr-only" > Advanced options< / span >
2022-08-29 19:02:00 -04:00
< / button >
2022-08-29 20:27:34 -04:00
< div ngbDropdownMenu aria-labelledby = "advancedButton" class = "dropdown-menu dropdown-menu-end folder-dropdown-menu" >
2023-04-09 11:27:41 +08:00
< div class = "container" >
< div class = "input-group add-url-component" >
< 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 class = "input-group add-url-component" >
< span class = "input-group-text" > Custom Name Prefix< / span >
< input type = "text" autocomplete = "off" spellcheck = "false" class = "form-control" placeholder = "Default" name = "customNamePrefix" [ ( ngModel ) ] = " customNamePrefix " [ disabled ] = " addInProgress | | downloads . loading " >
< / div >
2022-08-29 20:27:34 -04:00
< / div >
2022-08-29 19:02:00 -04:00
< / div >
< / div >
2021-09-13 20:25:32 +03:00
< / 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" >
2022-06-23 23:30:09 +03:00
< 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 >
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 >
2022-01-04 22:10:23 +00:00
< th scope = "col" style = "width: 2rem;" > < / th >
2019-11-29 19:31:34 +02:00
< / tr >
2019-12-03 22:32:07 +02:00
< / thead >
< tbody >
2023-08-14 11:39:36 +01:00
< tr * ngFor = "let download of downloads.queue | keyvalue: asIsOrder; trackBy: identifyDownloadRow" [ 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 >
2022-01-26 22:09:11 +02:00
< td title = "{{ download.value.filename }}" > {{ download.value.title }}< / td >
2019-11-29 19:31:34 +02:00
< 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 >
2022-01-04 22:04:53 +00:00
< td > < a href = "{{download.value.url}}" target = "_blank" > < fa-icon [ icon ] = " faExternalLinkAlt " > < / fa-icon > < / a > < / 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" >
2022-06-23 23:30:09 +03:00
< 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 >
< 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 >
< 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 >
2019-12-03 22:32:07 +02:00
< / th >
< th scope = "col" style = "width: 2rem;" > < / th >
2021-07-29 11:12:40 +03:00
< th scope = "col" style = "width: 2rem;" > < / th >
2022-01-04 22:16:42 +00:00
< th scope = "col" style = "width: 2rem;" > < / th >
2022-09-01 11:12:55 +02:00
< th scope = "col" style = "width: 2rem;" > < / th >
2019-12-03 22:32:07 +02:00
< / tr >
< / thead >
< tbody >
2023-08-14 11:39:36 +01:00
< tr * ngFor = "let download of downloads.done | keyvalue: asIsOrder; trackBy: identifyDownloadRow" [ class . disabled ] = ' download . value . deleting ' >
2019-12-03 22:32:07 +02:00
< 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;" >
2023-10-01 15:25:11 +02:00
< 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 >
2019-12-03 22:32:07 +02:00
< / div >
2022-08-30 01:22:24 -04:00
< span ngbTooltip = "{{download.value.msg}}" > < a * ngIf = "!!download.value.filename; else noDownloadLink" href = "{{buildDownloadLink(download.value)}}" target = "_blank" > {{ download.value.title }}< / a > < / span >
2021-12-13 22:35:19 +01:00
< ng-template # noDownloadLink > {{ download.value.title }}< / ng-template >
2019-12-03 22:32:07 +02:00
< / td >
2021-07-29 11:12:40 +03:00
< td >
2023-08-13 12:24:19 +01:00
< 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 >
2021-07-29 11:12:40 +03:00
< / td >
2022-09-01 11:12:55 +02:00
< td >
2023-02-10 23:35:09 +02:00
< a * ngIf = "!!download.value.filename; else noDownloadLink" href = "{{buildDownloadLink(download.value)}}" download > < fa-icon [ icon ] = " faDownload " > < / fa-icon > < / a >
2022-09-01 11:12:55 +02:00
< / td >
2022-01-04 22:04:53 +00:00
< td >
< a href = "{{download.value.url}}" target = "_blank" > < fa-icon [ icon ] = " faExternalLinkAlt " > < / fa-icon > < / a >
< / td >
2021-07-29 11:12:40 +03:00
< 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 -->