Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Findeton committed Jun 20, 2023
1 parent 3196081 commit 7b53916
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions avUi/common-header-directive/common-header-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,15 @@ angular
(
election &&
election.presentation &&
election.presentation.extra_options &&
_.isNumber(election.presentation.extra_options.booth_log_out__countdown_seconds)
_.isNumber(election.presentation.booth_log_out__countdown_seconds)
)
) {
scope.showCountdown = false;
scope.countdownSecs = 0;
scope.countdownMins = 0;

var initialTimeMs = Date.now();
scope.elapsedCountdownMs = (election.presentation.extra_options.booth_log_out__countdown_seconds || -1) * 1000;
scope.elapsedCountdownMs = (election.presentation.booth_log_out__countdown_seconds || -1) * 1000;
scope.logoutTimeMs = initialTimeMs + (ConfigService.cookies.expires || 10*60*1000) * 60 * 1000;
scope.countdownStartTimeMs = scope.logoutTimeMs - scope.elapsedCountdownMs;

Expand Down
4 changes: 2 additions & 2 deletions dist/appCommon-v8.0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,8 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist
}, scope.showVersionsModal = ShowVersionsModalService, function() {
scope.showCountdown = !1, scope.isDemo || scope.isPreview;
var initialTimeMs, election = scope.parentElection || scope.election;
ConfigService.cookies.expires && election && election.presentation && election.presentation.extra_options && _.isNumber(election.presentation.extra_options.booth_log_out__countdown_seconds) && (scope.showCountdown = !1,
scope.countdownSecs = 0, scope.countdownMins = 0, initialTimeMs = Date.now(), scope.elapsedCountdownMs = 1e3 * (election.presentation.extra_options.booth_log_out__countdown_seconds || -1),
ConfigService.cookies.expires && election && election.presentation && _.isNumber(election.presentation.booth_log_out__countdown_seconds) && (scope.showCountdown = !1,
scope.countdownSecs = 0, scope.countdownMins = 0, initialTimeMs = Date.now(), scope.elapsedCountdownMs = 1e3 * (election.presentation.booth_log_out__countdown_seconds || -1),
scope.logoutTimeMs = initialTimeMs + 60 * (ConfigService.cookies.expires || 6e5) * 1e3,
scope.countdownStartTimeMs = scope.logoutTimeMs - scope.elapsedCountdownMs, setTimeout(updateTimedown, 0 < scope.elapsedCountdownMs ? scope.countdownStartTimeMs - Date.now() : 0));
}();
Expand Down

0 comments on commit 7b53916

Please sign in to comment.