Nice header with server status, better chat layout

This commit is contained in:
Garry Newman
2016-07-11 09:57:17 +01:00
parent 569f5d0535
commit 2da3351935
6 changed files with 70 additions and 17 deletions
+5 -2
View File
@@ -1,7 +1,7 @@
app.controller( 'ServerInfoController', ServerInfoController );
function ServerInfoController( $scope, rconService, $routeParams )
function ServerInfoController( $scope, rconService, $routeParams, $interval )
{
$scope.info = {};
@@ -9,8 +9,11 @@ function ServerInfoController( $scope, rconService, $routeParams )
{
rconService.Request( 'serverinfo', $scope, function ( msg ) {
$scope.info = JSON.parse( msg.Message );
});
} );
}
rconService.InstallService( $scope, $scope.refresh );
var timer = $interval( $scope.refresh, 500 );
$scope.$on( "$destroy", function () { $interval.cancel( timer ); } );
}