diff --git a/frontend/public/inactivityWorker.js b/frontend/public/inactivityWorker.js index a568365..0c3865c 100644 --- a/frontend/public/inactivityWorker.js +++ b/frontend/public/inactivityWorker.js @@ -4,22 +4,29 @@ const TWENTY_FIVE_MINUTES = 1500; const TWO_MINUTES = 120; -let countdown = TWO_MINUTES + TWENTY_FIVE_MINUTES; -let timer = TWENTY_FIVE_MINUTES + TWO_MINUTES; +const time = TWO_MINUTES + TWENTY_FIVE_MINUTES; +let countdown = time; +let timer = time; setInterval(() => { timer--; - countdown--; + if (countdown > 0) { + countdown--; + } postMessage({ type: 'TICK', timer, countdown }); }, 1000); self.onmessage = (event) => { if (event.data === 'RESET') { - timer = TWENTY_FIVE_MINUTES; + timer = time; + + if (countdown < 120) { + countdown = time; + } } if (event.data === 'RESET_ALL') { - countdown = TWO_MINUTES + TWENTY_FIVE_MINUTES; - timer = TWO_MINUTES + TWENTY_FIVE_MINUTES; + countdown = time; + timer = time; } }; diff --git a/frontend/src/components/common/DocumentUpload.vue b/frontend/src/components/common/DocumentUpload.vue index 18bca2b..40bb540 100644 --- a/frontend/src/components/common/DocumentUpload.vue +++ b/frontend/src/components/common/DocumentUpload.vue @@ -104,7 +104,7 @@ export default { !value || !value.length || value[0].size < 32000000 || - `File size should not be larger than ${humanFileSize(32000000)}!`; + `File size should not be larger than 32MB`; if (ret !== true) { this.setFailureAlert(ret); }