dashboard: more gradient

This commit is contained in:
nemunaire 2019-03-27 00:28:41 +01:00
parent e7900cc5ac
commit 573a95a564
2 changed files with 4 additions and 7 deletions

View file

@ -48,9 +48,7 @@ angular.module("AdLinApp")
var refreshPing = function() {
$http.get("/api/students/" + $scope.student.id + "/ping").then(function(response) {
$scope.PING_time = new Date(response.data);
$scope.PINGw = new Date(Date.now() - 864000000) < $scope.PING_time;
$scope.PINGi = new Date(Date.now() - 900000) < $scope.PING_time;
$scope.PING = new Date(Date.now() - 90000) < $scope.PING_time;
$scope.PING = (Date.now() - $scope.PING_time)/1000;
});
}
refreshPing();
@ -99,12 +97,11 @@ angular.module("AdLinApp")
$scope.tuto_progress = tuto_progress;
$scope.mychallenges = {};
var refreshChal = function() {
var recent = new Date(Date.now() - 120000);
$http.get("/api/students/" + $scope.student.id + "/progress").then(function(response) {
angular.forEach(response.data, function(ch, chid) {
if (ch.time) {
response.data[chid].time = new Date(ch.time);
response.data[chid].recent = recent < response.data[chid].time;
response.data[chid].recent = (Date.now() - response.data[chid].time)/1000;
}
});
$scope.mychallenges = response.data