modify style

This commit is contained in:
MaysWind 2016-07-10 17:37:34 +08:00
parent 478aaeb754
commit 46140cb829
5 changed files with 15 additions and 16 deletions

View file

@ -71,6 +71,7 @@
task.idle = task.downloadSpeed == 0; task.idle = task.downloadSpeed == 0;
task.remainTime = calculateDownloadRemainTime(task.remainLength, task.downloadSpeed); task.remainTime = calculateDownloadRemainTime(task.remainLength, task.downloadSpeed);
task.seeder = (task.seeder === true || task.seeder === 'true');
var taskNameResult = getTaskName(task); var taskNameResult = getTaskName(task);
task.taskName = taskNameResult.name; task.taskName = taskNameResult.name;
@ -116,6 +117,7 @@
peer.completePercent = completedPieceCount / task.numPieces * 100; peer.completePercent = completedPieceCount / task.numPieces * 100;
peer.downloadSpeed = upstreamToSpeed; peer.downloadSpeed = upstreamToSpeed;
peer.uploadSpeed = downstreamFromSpeed; peer.uploadSpeed = downstreamFromSpeed;
peer.seeder = (peer.seeder === true || peer.seeder === 'true');
if (completedPieceCount == localTaskCompletedPieceCount && peer.completePercent != localTaskCompletedPercent) { if (completedPieceCount == localTaskCompletedPieceCount && peer.completePercent != localTaskCompletedPercent) {
peer.completePercent = localTaskCompletedPercent; peer.completePercent = localTaskCompletedPercent;

View file

@ -24,11 +24,7 @@
margin-right: 4px; margin-right: 4px;
} }
.piece-legend .piece { .piece-map .piece, .piece-legend > .piece {
margin-right: 2px;
}
.piece-map .piece, .piece-legend .piece {
width: 10px; width: 10px;
height: 10px; height: 10px;
background-color: #eef2f4; background-color: #eef2f4;
@ -37,7 +33,11 @@
margin-right: 1px; margin-right: 1px;
} }
.piece-map .piece.piece-completed, .piece-legend .piece.piece-completed { .piece-map .piece.piece-completed, .piece-legend > .piece.piece-completed {
background-color: #b8dd69; background-color: #b8dd69;
border-color: #b8dd69; border-color: #b8dd69;
} }
.piece-legend > .piece {
margin-right: 4px;
}

View file

@ -238,7 +238,8 @@
} }
.skin-aria-ng .icon-seeder { .skin-aria-ng .icon-seeder {
color: #da7362; margin-left: 4px;
color: #da412c;
} }
.skin-aria-ng .nav-tabs-custom { .skin-aria-ng .nav-tabs-custom {

View file

@ -39,8 +39,7 @@
<input id="{{'task_' + task.gid}}" type="checkbox" ng-model="taskContext.selected[task.gid]"/> <input id="{{'task_' + task.gid}}" type="checkbox" ng-model="taskContext.selected[task.gid]"/>
<label for="{{'task_' + task.gid}}"> <label for="{{'task_' + task.gid}}">
<span class="task-name" ng-bind="task.taskName" title="{{task.taskName}}"></span> <span class="task-name" ng-bind="task.taskName" title="{{task.taskName}}"></span>
</label> </label><i class="icon-seeder fa fa-angle-double-up" title="{{'Seeding' | translate}}" ng-if="task && task.status == 'active' && task.seeder"></i>
<i class="icon-seeder fa fa-magnet" title="{{'Seeding' | translate}}" ng-if="task && task.status == 'active' && (task.seeder === true || task.seeder === 'true')"></i>
</div> </div>
<div class="task-files"> <div class="task-files">
<span ng-bind="task.totalLength | readableVolumn"></span> <span ng-bind="task.totalLength | readableVolumn"></span>
@ -67,7 +66,7 @@
</div> </div>
</div> </div>
<div class="col-sm-2 hidden-xs"> <div class="col-sm-2 hidden-xs">
<span class="task-download-speed" ng-bind="(task.downloadSpeed | readableVolumn) + '/s'"></span> <span class="task-download-speed" ng-bind="(!task.seeder || task.downloadSpeed > 0 ? (task.downloadSpeed | readableVolumn) + '/s' : '-')"></span>
</div> </div>
</div> </div>
</div> </div>

View file

@ -140,12 +140,10 @@
<div class="tab-pane" ng-class="{'active': context.currentTab == 'blocks'}"> <div class="tab-pane" ng-class="{'active': context.currentTab == 'blocks'}">
<div class="piece-legends"> <div class="piece-legends">
<div class="piece-legend"> <div class="piece-legend">
<div class="piece piece-completed"></div> <div class="piece piece-completed"></div><span translate>Completed</span>
<span translate>Completed</span>
</div> </div>
<div class="piece-legend"> <div class="piece-legend">
<div class="piece"></div> <div class="piece"></div><span translate>Uncompleted</span>
<span translate>Uncompleted</span>
</div> </div>
</div> </div>
<ng-piece-map bit-field="task.bitfield" piece-count="task.numPieces"></ng-piece-map> <ng-piece-map bit-field="task.bitfield" piece-count="task.numPieces"></ng-piece-map>
@ -258,8 +256,7 @@
<div class="task-table-body"> <div class="task-table-body">
<div class="row" ng-repeat="peer in context.btPeers | peerOrderBy: getPeerListOrderType()"> <div class="row" ng-repeat="peer in context.btPeers | peerOrderBy: getPeerListOrderType()">
<div class="col-sm-3"> <div class="col-sm-3">
<span ng-bind="peer.name | translate"></span> <span ng-bind="peer.name | translate"></span><i class="icon-seeder fa fa-angle-double-up" title="{{'Seeding' | translate}}" ng-if="peer && peer.seeder"></i>
<i class="icon-seeder fa fa-magnet" title="{{'Seeding' | translate}}" ng-if="peer && (peer.seeder === true || peer.seeder === 'true')"></i>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<div class="piece-bar-wrapper"> <div class="piece-bar-wrapper">