support display seed creation time

This commit is contained in:
MaysWind 2016-06-24 22:50:49 +08:00
parent 90a4de8a87
commit 1376694c24
5 changed files with 31 additions and 8 deletions

View file

@ -295,6 +295,7 @@
<script src="scripts/directives/setting.js"></script> <script src="scripts/directives/setting.js"></script>
<script src="scripts/filters/dateDuration.js"></script> <script src="scripts/filters/dateDuration.js"></script>
<script src="scripts/filters/fileOrderBy.js"></script> <script src="scripts/filters/fileOrderBy.js"></script>
<script src="scripts/filters/longDate.js"></script>
<script src="scripts/filters/peerOrderBy.js"></script> <script src="scripts/filters/peerOrderBy.js"></script>
<script src="scripts/filters/percent.js"></script> <script src="scripts/filters/percent.js"></script>
<script src="scripts/filters/taskOrderBy.js"></script> <script src="scripts/filters/taskOrderBy.js"></script>

View file

@ -62,6 +62,7 @@
"Info Hash": "特征值", "Info Hash": "特征值",
"Seeders": "种子数", "Seeders": "种子数",
"Connections": "连接数", "Connections": "连接数",
"Seed Creation Time": "种子创建时间",
"Download Dir": "下载路径", "Download Dir": "下载路径",
"Address": "地址", "Address": "地址",
"Status": "状态", "Status": "状态",
@ -119,6 +120,7 @@
"Changes to the settings take effect after refreshing page.": "设置将在页面刷新后生效.", "Changes to the settings take effect after refreshing page.": "设置将在页面刷新后生效.",
"Type is illegal!": "类型错误!", "Type is illegal!": "类型错误!",
"format": { "format": {
"longdate": "YYYY年MM月DD日 HH:mm:ss",
"time.millisecond": "{{value}} 毫秒", "time.millisecond": "{{value}} 毫秒",
"time.milliseconds": "{{value}} 毫秒", "time.milliseconds": "{{value}} 毫秒",
"time.second": "{{value}} 秒", "time.second": "{{value}} 秒",

View file

@ -66,6 +66,7 @@
'Info Hash': 'Info Hash', 'Info Hash': 'Info Hash',
'Seeders': 'Seeders', 'Seeders': 'Seeders',
'Connections': 'Connections', 'Connections': 'Connections',
'Seed Creation Time': 'Seed Creation Time',
'Download Dir': 'Download Dir', 'Download Dir': 'Download Dir',
'Address': 'Address', 'Address': 'Address',
'Status': 'Status', 'Status': 'Status',
@ -123,6 +124,7 @@
'Changes to the settings take effect after refreshing page.': 'Changes to the settings take effect after refreshing page.', 'Changes to the settings take effect after refreshing page.': 'Changes to the settings take effect after refreshing page.',
'Type is illegal!': 'Type is illegal!', 'Type is illegal!': 'Type is illegal!',
'format': { 'format': {
'longdate': 'MM/DD/YYYY HH:mm:ss',
'time.millisecond': '{{value}} Millisecond', 'time.millisecond': '{{value}} Millisecond',
'time.milliseconds': '{{value}} Milliseconds', 'time.milliseconds': '{{value}} Milliseconds',
'time.second': '{{value}} Second', 'time.second': '{{value}} Second',

View file

@ -0,0 +1,10 @@
(function () {
'use strict';
angular.module('ariaNg').filter('longDate', ['$translate', 'moment', function ($translate, moment) {
return function (time) {
var format = $translate.instant('format.longdate');
return moment(time).format(format);
}
}]);
})();

View file

@ -96,14 +96,6 @@
<span ng-bind="0 <= task.remainTime && task.remainTime < 86400? (task.remainTime | dateDuration: 'second': 'HH:mm:ss') : ('More Than One Day' | translate)"></span> <span ng-bind="0 <= task.remainTime && task.remainTime < 86400? (task.remainTime | dateDuration: 'second': 'HH:mm:ss') : ('More Than One Day' | translate)"></span>
</div> </div>
</div> </div>
<div class="row" ng-if="task && task.infoHash">
<div class="setting-key col-sm-4">
<span translate>Info Hash</span>
</div>
<div class="setting-value col-sm-8">
<span ng-bind="task.infoHash"></span>
</div>
</div>
<div class="row" ng-if="task && task.status == 'active'"> <div class="row" ng-if="task && task.status == 'active'">
<div class="setting-key col-sm-4"> <div class="setting-key col-sm-4">
<span ng-bind="(task.bittorrent ? ('Seeders' | translate) + ' / ' : '') + ('Connections' | translate)">Connections</span> <span ng-bind="(task.bittorrent ? ('Seeders' | translate) + ' / ' : '') + ('Connections' | translate)">Connections</span>
@ -112,6 +104,22 @@
<span ng-bind="(task.numSeeders ? (task.numSeeders + ' / ') : '') + task.connections"></span> <span ng-bind="(task.numSeeders ? (task.numSeeders + ' / ') : '') + task.connections"></span>
</div> </div>
</div> </div>
<div class="row" ng-if="task && task.bittorrent && task.bittorrent.creationDate">
<div class="setting-key col-sm-4">
<span translate>Seed Creation Time</span>
</div>
<div class="setting-value col-sm-8">
<span ng-bind="task.bittorrent.creationDate | amFromUnix | longDate"></span>
</div>
</div>
<div class="row" ng-if="task && task.infoHash">
<div class="setting-key col-sm-4">
<span translate>Info Hash</span>
</div>
<div class="setting-value col-sm-8">
<span ng-bind="task.infoHash"></span>
</div>
</div>
<div class="row" ng-if="task"> <div class="row" ng-if="task">
<div class="setting-key col-sm-4"> <div class="setting-key col-sm-4">
<span translate>Download Dir</span> <span translate>Download Dir</span>