show verifying percent when task status is verifying

This commit is contained in:
MaysWind 2019-05-24 23:54:51 +08:00
parent 02dcfa6c8c
commit 3950c7a528
7 changed files with 13 additions and 4 deletions

View file

@ -296,6 +296,7 @@ requires.aria2-version=需要 aria2 v{{version}} 或更高版本
task.new.download-links=下载链接 ({{count}} 个链接): task.new.download-links=下载链接 ({{count}} 个链接):
task.pieceinfo=已完成: {{completed}}, 共计: {{total}} 块 task.pieceinfo=已完成: {{completed}}, 共计: {{total}} 块
task.error-occurred=发生错误 ({{errorcode}}) task.error-occurred=发生错误 ({{errorcode}})
task.verifying-percent=正在验证 ({{verifiedPercent}}%)
settings.file-count=({{count}} 个文件) settings.file-count=({{count}} 个文件)
settings.total-count=(共计: {{count}}个) settings.total-count=(共计: {{count}}个)
debug.latest-logs=最近 {{count}} 条日志 debug.latest-logs=最近 {{count}} 条日志

View file

@ -296,6 +296,7 @@ requires.aria2-version=需要 aria2 v{{version}} 或更高版本
task.new.download-links=下載連結 ({{count}} 个連結): task.new.download-links=下載連結 ({{count}} 个連結):
task.pieceinfo=已完成: {{completed}}, 共計: {{total}} 塊 task.pieceinfo=已完成: {{completed}}, 共計: {{total}} 塊
task.error-occurred=發生錯誤 ({{errorcode}}) task.error-occurred=發生錯誤 ({{errorcode}})
task.verifying-percent=正在驗證 ({{verifiedPercent}}%)
settings.file-count=({{count}} 個檔案) settings.file-count=({{count}} 個檔案)
settings.total-count=(共計: {{count}}個) settings.total-count=(共計: {{count}}個)
debug.latest-logs=最近 {{count}} 條記錄 debug.latest-logs=最近 {{count}} 條記錄

View file

@ -300,6 +300,7 @@
'task.new.download-links': 'Download Links ({{count}} Links):', 'task.new.download-links': 'Download Links ({{count}} Links):',
'task.pieceinfo': 'Completed: {{completed}}, Total: {{total}}', 'task.pieceinfo': 'Completed: {{completed}}, Total: {{total}}',
'task.error-occurred': 'Error Occurred ({{errorcode}})', 'task.error-occurred': 'Error Occurred ({{errorcode}})',
'task.verifying-percent': 'Verifying ({{verifiedPercent}}%)',
'settings.file-count': '({{count}} Files)', 'settings.file-count': '({{count}} Files)',
'settings.total-count': '(Total Count: {{count}})', 'settings.total-count': '(Total Count: {{count}})',
'debug.latest-logs': 'Latest {{count}} Logs' 'debug.latest-logs': 'Latest {{count}} Logs'

View file

@ -11,7 +11,7 @@
if (task.verifyIntegrityPending) { if (task.verifyIntegrityPending) {
return 'Pending Verification'; return 'Pending Verification';
} else if (task.verifiedLength) { } else if (task.verifiedLength) {
return 'Verifying'; return (task.verifiedPercent ? 'format.task.verifying-percent' : 'Verifying');
} else if (task.seeder === true || task.seeder === 'true') { } else if (task.seeder === true || task.seeder === 'true') {
return 'Seeding'; return 'Seeding';
} else { } else {

View file

@ -294,6 +294,12 @@
task.remainTime = calculateDownloadRemainTime(task.remainLength, task.downloadSpeed); task.remainTime = calculateDownloadRemainTime(task.remainLength, task.downloadSpeed);
task.seeder = (task.seeder === true || task.seeder === 'true'); task.seeder = (task.seeder === true || task.seeder === 'true');
if (task.verifiedLength && task.totalLength) {
task.verifiedPercent = parseInt(task.verifiedLength / task.totalLength * 100);
} else {
task.verifiedPercent = undefined;
}
var taskNameResult = getTaskName(task); var taskNameResult = getTaskName(task);
task.taskName = taskNameResult.name; task.taskName = taskNameResult.name;
task.hasTaskName = taskNameResult.success; task.hasTaskName = taskNameResult.success;

View file

@ -65,13 +65,13 @@
<span class="task-last-time" <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> 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" <span class="task-download-speed visible-xs-inline pull-right"
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> 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, verifiedPercent: task.verifiedPercent}))"></span>
<span class="task-seeders pull-right" ng-bind="task.status === 'active' ? ((task.numSeeders ? (task.numSeeders + '/') : '') + task.connections) : ''"></span> <span class="task-seeders pull-right" ng-bind="task.status === 'active' ? ((task.numSeeders ? (task.numSeeders + '/') : '') + task.connections) : ''"></span>
</div> </div>
</div> </div>
<div class="col-md-2 col-sm-2 hidden-xs"> <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' : '') : ''}}" <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.verifyIntegrityPending && !task.verifiedLength ? (!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, verifiedPercent: task.verifiedPercent}))"></span>
</div> </div>
<div class="task-right-arrow visible-md visible-lg"> <div class="task-right-arrow visible-md visible-lg">
<a ng-href="#!/task/detail/{{task.gid}}" title="{{'Click to view task detail' | translate}}"> <a ng-href="#!/task/detail/{{task.gid}}" title="{{'Click to view task detail' | translate}}">

View file

@ -48,7 +48,7 @@
<span translate>Task Status</span> <span translate>Task Status</span>
</div> </div>
<div class="setting-value col-sm-8"> <div class="setting-value col-sm-8">
<span ng-bind="task | taskStatus | translate: {errorcode: task.errorCode}"></span> <span ng-bind="task | taskStatus | translate: {errorcode: task.errorCode, verifiedPercent: task.verifiedPercent}"></span>
<i class="icon-primary fa fa-question-circle" ng-if="task.errorCode && task.errorCode != '0' && task.errorMessage" <i class="icon-primary fa fa-question-circle" ng-if="task.errorCode && task.errorCode != '0' && task.errorMessage"
ng-tooltip="{{task.errorMessage}}" ng-tooltip-container="body" ng-tooltip-placement="top"></i> ng-tooltip="{{task.errorMessage}}" ng-tooltip-container="body" ng-tooltip-placement="top"></i>
</div> </div>