dashboard: Allow countdown to be hidden

This commit is contained in:
nemunaire 2023-08-01 18:19:12 +02:00
parent 17d140d7cc
commit 11662d8c5e

View file

@ -240,6 +240,17 @@ angular.module("FICApp")
});
angular.module("FICApp")
.run(function($rootScope) {
$rootScope.recvTime = function(response) {
time = {
"cu": Math.floor(response.headers("x-fic-time") * 1000),
"he": (new Date()).getTime(),
};
sessionStorage.time = angular.toJson(time);
return time;
}
})
.controller("CountdownController", function($scope, $rootScope, $interval) {
var time;
if (sessionStorage.time)
@ -253,14 +264,6 @@ angular.module("FICApp")
else
return undefined;
}
$rootScope.recvTime = function(response) {
time = {
"cu": Math.floor(response.headers("x-fic-time") * 1000),
"he": (new Date()).getTime(),
};
sessionStorage.time = angular.toJson(time);
return time;
}
function updTime() {
if (time && $rootScope.settings && $rootScope.settings.end) {