frontend: browser notifications of challenge events

This commit is contained in:
nemunaire 2018-12-01 18:15:03 +01:00
parent 8749a7c164
commit 12eddadc07
2 changed files with 61 additions and 0 deletions

View file

@ -138,6 +138,12 @@ angular.module("FICApp")
$scope.time = {};
$rootScope.getSrvTime = function() {
if (time.cu && time.he)
return new Date(Date.now() + (time.cu - time.he));
else
return undefined;
}
$rootScope.recvTime = function(response) {
time = {
"cu": Math.floor(response.headers("x-fic-time") * 1000),