add verifying and pending verification status

master
MaysWind 2019-04-23 00:44:45 +08:00
parent 1b3067c0c4
commit 0c5a6ce76b
7 changed files with 24 additions and 4 deletions

View File

@ -54,6 +54,8 @@ Filters=过滤器
Download=下载
Upload=上传
Downloading=正在下载
Pending Verification=等待验证
Verifying=正在验证
Seeding=正在做种
Waiting=正在等待
Paused=已暂停

View File

@ -54,6 +54,8 @@ Filters=篩選器
Download=下載
Upload=上傳
Downloading=正在下載
Pending Verification=等待驗證
Verifying=正在驗證
Seeding=正在做種
Waiting=正在等待
Paused=已暫停

View File

@ -58,6 +58,8 @@
'Download': 'Download',
'Upload': 'Upload',
'Downloading': 'Downloading',
'Pending Verification': 'Pending Verification',
'Verifying': 'Verifying',
'Seeding': 'Seeding',
'Waiting': 'Waiting',
'Paused': 'Paused',

View File

@ -32,6 +32,14 @@
$rootScope.taskContext.list = taskList;
needRequestWholeInfo = false;
} else {
if ($rootScope.taskContext.list && $rootScope.taskContext.list.length > 0) {
for (var i = 0; i < $rootScope.taskContext.list.length; i++) {
var task = $rootScope.taskContext.list[i];
delete task.verifiedLength;
delete task.verifyIntegrityPending;
}
}
if (ariaNgCommonService.extendArray(taskList, $rootScope.taskContext.list, 'gid')) {
needRequestWholeInfo = false;
} else {

View File

@ -8,7 +8,11 @@
}
if (task.status === 'active') {
if (task.seeder === true || task.seeder === 'true') {
if (task.verifyIntegrityPending) {
return 'Pending Verification';
} else if (task.verifiedLength) {
return 'Verifying';
} else if (task.seeder === true || task.seeder === 'true') {
return 'Seeding';
} else {
return 'Downloading';

View File

@ -280,7 +280,9 @@
'numSeeders',
'seeder',
'status',
'errorCode'
'errorCode',
'verifiedLength',
'verifyIntegrityPending'
];
},
getFullTaskParams: function () {

View File

@ -65,13 +65,13 @@
<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>
<span class="task-download-speed visible-xs-inline pull-right"
ng-bind="(task.status === 'active' ? (!task.seeder || task.downloadSpeed > 0 ? (task.downloadSpeed | readableVolume) + '/s' : '-') : (task | taskStatus: true | translate: {errorcode: task.errorCode}))"></span>
ng-bind="(task.status === 'active' && !task.verifyIntegrityPending && !task.verifiedLength ? (!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>
</div>
</div>
<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' : '') : ''}}"
ng-bind="(task.status === 'active' ? (!task.seeder || task.downloadSpeed > 0 ? (task.downloadSpeed | readableVolume) + '/s' : '-') : (task | taskStatus: true | translate: {errorcode: task.errorCode}))"></span>
ng-bind="(task.status === 'active' && !task.verifyIntegrityPending && !task.verifiedLength ? (!task.seeder || task.downloadSpeed > 0 ? (task.downloadSpeed | readableVolume) + '/s' : '-') : (task | taskStatus: true | translate: {errorcode: task.errorCode}))"></span>
</div>
<div class="task-right-arrow visible-md visible-lg">
<a ng-href="#!/task/detail/{{task.gid}}" title="{{'Click to view task detail' | translate}}">