always show aria2 status when connect aria2 via websocket

This commit is contained in:
MaysWind 2019-04-17 00:04:42 +08:00
parent de5884e94e
commit b57381cb0c
2 changed files with 2 additions and 1 deletions

View file

@ -240,7 +240,7 @@
</li>
<li data-href-match="/status">
<a href="#!/status">
<span class="label pull-right" ng-if="globalStatusContext.isEnabled" ng-class="{'label-primary': taskContext.rpcStatus === 'Connecting', 'label-success': taskContext.rpcStatus === 'Connected', 'label-danger': taskContext.rpcStatus === 'Disconnected'}" ng-bind="taskContext.rpcStatus | translate"></span>
<span class="label pull-right" ng-if="globalStatusContext.isEnabled || isCurrentRpcUseWebSocket" ng-class="{'label-primary': taskContext.rpcStatus === 'Connecting', 'label-success': taskContext.rpcStatus === 'Connected', 'label-danger': taskContext.rpcStatus === 'Disconnected'}" ng-bind="taskContext.rpcStatus | translate"></span>
<i class="fa fa-server"></i> <span translate>Aria2 Status</span>
</a>
</li>

View file

@ -63,6 +63,7 @@
$scope.quickSettingContext = null;
$scope.rpcSettings = ariaNgSettingService.getAllRpcSettings();
$scope.isCurrentRpcUseWebSocket = ariaNgSettingService.isCurrentRpcUseWebSocket();
$scope.isTaskSelected = function () {
return $rootScope.taskContext.getSelectedTaskIds().length > 0;