This repository has been archived on 2022-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
AriaNg/src/views/list.html

196 lines
13 KiB
HTML
Raw Normal View History

2016-05-13 18:09:12 +02:00
<section class="content no-padding">
<div id="task-table" class="task-table">
2016-06-19 12:30:33 +02:00
<div class="task-table-title">
2016-05-17 17:00:07 +02:00
<div class="row">
2016-07-16 15:47:11 +02:00
<div class="col-md-8 col-sm-7">
2016-05-17 17:00:07 +02:00
<div class="row">
<div class="col-sm-8">
2016-05-25 18:09:00 +02:00
<a ng-click="changeDisplayOrder('name:asc', true)" translate>File Name</a>
2016-05-28 18:16:32 +02:00
<i class="fa" ng-class="{'fa-sort-asc fa-order-asc': isSetDisplayOrder('name:asc'), 'fa-sort-desc fa-order-desc': isSetDisplayOrder('name:desc')}"></i>
2016-05-17 17:00:07 +02:00
</div>
<div class="col-sm-4">
2016-05-25 18:09:00 +02:00
<a ng-click="changeDisplayOrder('size:asc', true)" translate>File Size</a>
2016-05-28 18:16:32 +02:00
<i class="fa" ng-class="{'fa-sort-asc fa-order-asc': isSetDisplayOrder('size:asc'), 'fa-sort-desc fa-order-desc': isSetDisplayOrder('size:desc')}"></i>
2016-05-17 17:00:07 +02:00
</div>
</div>
</div>
2016-07-16 15:47:11 +02:00
<div class="col-md-2 col-sm-3">
2016-05-17 17:00:07 +02:00
<div class="row">
<div class="col-sm-6">
2016-07-06 18:22:02 +02:00
<a ng-click="changeDisplayOrder('percent:desc', true)" translate>Progress</a>
2016-05-28 18:16:32 +02:00
<i class="fa" ng-class="{'fa-sort-asc fa-order-asc': isSetDisplayOrder('percent:asc'), 'fa-sort-desc fa-order-desc': isSetDisplayOrder('percent:desc')}"></i>
2016-05-17 17:00:07 +02:00
</div>
<div class="col-sm-6">
2016-05-25 18:09:00 +02:00
<a ng-click="changeDisplayOrder('remain:asc', true)" translate>Remain Time</a>
2016-05-28 18:16:32 +02:00
<i class="fa" ng-class="{'fa-sort-asc fa-order-asc': isSetDisplayOrder('remain:asc'), 'fa-sort-desc fa-order-desc': isSetDisplayOrder('remain:desc')}"></i>
2016-05-17 17:00:07 +02:00
</div>
2016-05-13 18:09:12 +02:00
</div>
</div>
2016-07-16 15:47:11 +02:00
<div class="col-md-2 col-sm-2">
2016-05-28 18:16:32 +02:00
<a ng-click="changeDisplayOrder('dspeed:desc', true)" translate>Download Speed</a>
<i class="fa" ng-class="{'fa-sort-asc fa-order-asc': isSetDisplayOrder('dspeed:asc'), 'fa-sort-desc fa-order-desc': isSetDisplayOrder('dspeed:desc')}"></i>
2016-05-13 18:09:12 +02:00
</div>
</div>
2016-05-17 17:00:07 +02:00
</div>
<div class="task-table-body" ng-class="{'draggable': isSupportDragTask()}" dragula="'task-list'" dragula-model="taskContext.list">
<div class="row pointer-cursor" ng-repeat="task in taskContext.list | filter: filterTask | taskOrderBy: getOrderType()"
data-gid="{{task.gid}}" data-selected="{{!!taskContext.selected[task.gid]}}" data-toggle="context" data-target="#task-table-contextmenu"
ng-click="taskContext.selected[task.gid] = !taskContext.selected[task.gid]">
2016-07-16 15:47:11 +02:00
<div class="col-md-8 col-sm-7 col-xs-12">
2016-05-29 17:27:47 +02:00
<div class="checkbox checkbox-primary" ng-class="{'checkbox-hide': !taskContext.selected[task.gid]}">
<input id="{{'task_' + task.gid}}" type="checkbox" ng-model="taskContext.selected[task.gid]"/>
<label for="{{'task_' + task.gid}}">
<span class="task-name auto-ellipsis" ng-bind="task.taskName" title="{{task.taskName}}"></span>
</label>
2016-05-29 17:27:47 +02:00
</div>
2016-05-17 17:00:07 +02:00
<div class="task-files">
2017-03-19 08:43:41 +01:00
<span ng-bind="task.totalLength | readableVolume"></span>
2017-05-19 17:36:37 +02:00
<a ng-href="#!/task/detail/{{task.gid}}" title="{{'Click to view task detail' | translate}}">
<span ng-if="task.files" ng-bind="('format.settings.file-count' | translate: {count: task.selectedFileCount})"></span>
2018-05-20 17:09:59 +02:00
</a><i class="icon-error fa fa-times" ng-if="task && task.status === 'error' && task.errorDescription" title="{{task.errorDescription | translate}}"></i><i class="icon-seeder fa fa-arrow-up" ng-if="task && task.status === 'active' && task.seeder" title="{{'Seeding' | translate}}"></i>
2018-11-11 15:23:11 +01:00
<a ng-if="isTaskRetryable(task)" ng-click="retryTask(task)" title="{{'Retry' | translate}}" translate>Retry</a>
2016-05-17 17:00:07 +02:00
</div>
</div>
2016-07-16 15:47:11 +02:00
<div class="col-md-2 col-sm-3 col-xs-12">
2016-05-17 17:00:07 +02:00
<div class="progress">
<div class="progress-bar" role="progressbar"
2018-05-20 17:09:59 +02:00
ng-class="{'progress-bar-primary': task.status !== 'error', 'progress-bar-warning': task.status === 'error'}"
2016-05-17 17:00:07 +02:00
aria-valuenow="{{task.completePercent}}" aria-valuemin="1"
2016-05-23 16:42:00 +02:00
aria-valuemax="100" ng-style="{ width: task.completePercent + '%' }">
2016-05-18 18:08:51 +02:00
<span ng-class="{'progress-lower': task.completePercent < 50}"
ng-bind="(task.completePercent | percent: 2) + '%'"></span>
2016-05-17 17:00:07 +02:00
</div>
</div>
<div>
<span class="task-last-time"
ng-bind="task.status === 'waiting' ? '--:--:--' : (task.status === 'paused' ? '' : (task.status === 'active' ? ((0 <= task.remainTime && task.remainTime < 86400) ? (task.remainTime | dateDuration: 'second': 'HH:mm:ss') : ('More Than One Day' | translate)) : ''))"></span>
2016-05-17 17:00:07 +02:00
<span class="task-download-speed visible-xs-inline pull-right"
2019-04-22 17:06:05 +02:00
ng-bind="(task.status === 'active' ? (!task.seeder || task.downloadSpeed > 0 ? (task.downloadSpeed | readableVolume) + '/s' : '-') : (task | taskStatus: true | translate: {errorcode: task.errorCode}))"></span>
<span class="task-seeders pull-right" ng-bind="task.status === 'active' ? ((task.numSeeders ? (task.numSeeders + '/') : '') + task.connections) : ''"></span>
2016-05-17 17:00:07 +02:00
</div>
</div>
2016-07-16 15:47:11 +02:00
<div class="col-md-2 col-sm-2 hidden-xs">
<span class="task-download-speed" title="{{task.status === 'active' ? (('Download Speed' | translate) + ': ' + (task.downloadSpeed | readableVolume) + '/s') + (task.bittorrent ? ', ' + ('Upload Speed' | translate) + ': ' + (task.uploadSpeed | readableVolume) + '/s' : '') : ''}}"
2019-04-22 17:06:05 +02:00
ng-bind="(task.status === 'active' ? (!task.seeder || task.downloadSpeed > 0 ? (task.downloadSpeed | readableVolume) + '/s' : '-') : (task | taskStatus: true | translate: {errorcode: task.errorCode}))"></span>
2016-05-17 17:00:07 +02:00
</div>
2019-01-27 15:46:02 +01:00
<div class="task-right-arrow visible-md visible-lg">
<a ng-href="#!/task/detail/{{task.gid}}" title="{{'Click to view task detail' | translate}}">
<i class="fa fa-angle-right"></i>
</a>
</div>
2016-05-13 18:09:12 +02:00
</div>
</div>
2016-12-10 16:04:03 +01:00
<div id="task-table-contextmenu">
<ul class="dropdown-menu" role="menu">
2018-11-11 15:23:11 +01:00
<li ng-if="isSelectedTaskRetryable()">
<a tabindex="-1" class="pointer-cursor" title="{{'Retry Selected Tasks' | translate}}" ng-click="retryTasks()">
2019-01-27 15:18:04 +01:00
<i class="fa fa-refresh fa-fw"></i>
2018-11-11 15:23:11 +01:00
<span translate>Retry Selected Tasks</span>
</a>
</li>
<li class="divider" ng-if="isSelectedTaskRetryable()"></li>
2018-08-14 23:52:57 +02:00
<li ng-if="isSpecifiedTaskSelected('paused')">
2016-12-10 16:04:03 +01:00
<a tabindex="-1" class="pointer-cursor" title="{{'Start' | translate}}" ng-click="changeTasksState('start')">
2019-01-27 15:18:04 +01:00
<i class="fa fa-play fa-fw"></i>
2016-12-10 16:04:03 +01:00
<span translate>Start</span>
</a>
</li>
2018-08-14 23:52:57 +02:00
<li ng-if="isSpecifiedTaskSelected('active', 'waiting')">
2016-12-10 16:04:03 +01:00
<a tabindex="-1" class="pointer-cursor" title="{{'Pause' | translate}}" ng-click="changeTasksState('pause')">
2019-01-27 15:18:04 +01:00
<i class="fa fa-pause fa-fw"></i>
2016-12-10 16:04:03 +01:00
<span translate>Pause</span>
</a>
</li>
2018-08-14 23:52:57 +02:00
<li ng-if="isTaskSelected()">
2016-12-10 16:04:03 +01:00
<a tabindex="-1" class="pointer-cursor" title="{{'Delete' | translate}}" ng-click="removeTasks()">
2019-01-27 15:18:04 +01:00
<i class="fa fa-trash-o fa-fw"></i>
2016-12-10 16:04:03 +01:00
<span translate>Delete</span>
</a>
</li>
2018-08-14 23:52:57 +02:00
<li class="divider" ng-if="isTaskSelected()"></li>
2016-12-10 16:04:03 +01:00
<li class="dropdown dropdown-submenu">
<a tabindex="-1" title="{{'Display Order' | translate}}" href="javascript:void(0);">
2019-01-27 15:18:04 +01:00
<i class="fa fa-sort-alpha-asc fa-fw"></i>
2016-12-10 16:04:03 +01:00
<span translate>Display Order</span>
</a>
<ul class="dropdown-menu" style="right: 160px;">
<li>
<a class="pointer-cursor" ng-click="changeDisplayOrder('default:asc')">
<span translate>Default</span>
2019-01-27 15:18:04 +01:00
<i class="fa fa-fw" ng-class="{'fa-check': isSetDisplayOrder('default')}"></i>
2016-12-10 16:04:03 +01:00
</a>
</li>
<li>
<a class="pointer-cursor" ng-click="changeDisplayOrder('name:asc')">
<span translate>By File Name</span>
2019-01-27 15:18:04 +01:00
<i class="fa fa-fw" ng-class="{'fa-check': isSetDisplayOrder('name')}"></i>
2016-12-10 16:04:03 +01:00
</a>
</li>
<li>
<a class="pointer-cursor" ng-click="changeDisplayOrder('size:asc')">
<span translate>By File Size</span>
2019-01-27 15:18:04 +01:00
<i class="fa fa-fw" ng-class="{'fa-check': isSetDisplayOrder('size')}"></i>
2016-12-10 16:04:03 +01:00
</a>
</li>
<li>
<a class="pointer-cursor" ng-click="changeDisplayOrder('percent:desc')">
<span translate>By Progress</span>
2019-01-27 15:18:04 +01:00
<i class="fa fa-fw" ng-class="{'fa-check': isSetDisplayOrder('percent')}"></i>
2016-12-10 16:04:03 +01:00
</a>
</li>
<li>
<a class="pointer-cursor" ng-click="changeDisplayOrder('remain:asc')">
<span translate>By Remain Time</span>
2019-01-27 15:18:04 +01:00
<i class="fa fa-fw" ng-class="{'fa-check': isSetDisplayOrder('remain')}"></i>
2016-12-10 16:04:03 +01:00
</a>
</li>
<li>
<a class="pointer-cursor" ng-click="changeDisplayOrder('dspeed:desc')">
<span translate>By Download Speed</span>
2019-01-27 15:18:04 +01:00
<i class="fa fa-fw" ng-class="{'fa-check': isSetDisplayOrder('dspeed')}"></i>
2016-12-10 16:04:03 +01:00
</a>
</li>
<li>
<a class="pointer-cursor" ng-click="changeDisplayOrder('uspeed:desc')">
<span translate>By Upload Speed</span>
2019-01-27 15:18:04 +01:00
<i class="fa fa-fw" ng-class="{'fa-check': isSetDisplayOrder('uspeed')}"></i>
2016-12-10 16:04:03 +01:00
</a>
</li>
</ul>
</li>
2019-04-07 08:23:56 +02:00
<li ng-if="hasRetryableTask()">
2019-04-22 18:16:02 +02:00
<a tabindex="-1" class="pointer-cursor" title="{{'Select All Failed Tasks' | translate}}" ng-click="selectAllFailedTasks()">
2019-04-07 08:23:56 +02:00
<i class="fa fa-fw"></i>
2019-04-22 18:16:02 +02:00
<span translate>Select All Failed Tasks</span>
2019-04-07 08:23:56 +02:00
</a>
</li>
2019-04-22 18:15:17 +02:00
<li ng-if="hasCompletedTask()">
<a tabindex="-1" class="pointer-cursor" title="{{'Select All Completed Tasks' | translate}}" ng-click="selectAllCompletedTasks()">
<i class="fa fa-fw"></i>
<span translate>Select All Completed Tasks</span>
</a>
</li>
2019-04-22 17:15:53 +02:00
<li>
<a tabindex="-1" class="pointer-cursor" title="{{'Select All' | translate}}" ng-click="selectAllTasks()">
<i class="fa fa-th-large fa-fw"></i>
<span translate>Select All</span>
</a>
</li>
2019-03-27 17:41:10 +01:00
<li class="divider" ng-if="isSingleUrlTaskSelected() || isSingleBittorrentHasInfoHashTaskSelected()"></li>
2018-08-14 23:52:57 +02:00
<li ng-if="isSingleUrlTaskSelected()">
<a tabindex="-1" class="pointer-cursor" title="{{'Copy Download Url' | translate}}" ng-click="copySelectedOneTaskDownloadLink()">
2019-01-27 15:18:04 +01:00
<i class="fa fa-copy fa-fw"></i>
<span translate>Copy Download Url</span>
</a>
</li>
2019-03-27 17:41:10 +01:00
<li ng-if="isSingleBittorrentHasInfoHashTaskSelected()">
<a tabindex="-1" class="pointer-cursor" title="{{'Copy Magnet Link' | translate}}" ng-click="copySelectedOneTaskMagnetLink()">
<i class="fa fa-copy fa-fw"></i>
<span translate>Copy Magnet Link</span>
</a>
</li>
2016-12-10 16:04:03 +01:00
</ul>
</div>
2016-05-13 18:09:12 +02:00
</div>
</section>