From dbe333afef3c507e3ba09e6a398e493698717fb3 Mon Sep 17 00:00:00 2001 From: Carlos Venegas Date: Wed, 30 Oct 2024 18:32:53 +0100 Subject: [PATCH] Fix ms to seconds in waiting modal with timer --- app/resources/libs/Icestudio/GUI/WafleModal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/resources/libs/Icestudio/GUI/WafleModal.js b/app/resources/libs/Icestudio/GUI/WafleModal.js index 119d7fe6..c0f9c5c9 100644 --- a/app/resources/libs/Icestudio/GUI/WafleModal.js +++ b/app/resources/libs/Icestudio/GUI/WafleModal.js @@ -6,7 +6,7 @@ class WafleModal{ } waitingSeconds(seconds,title,msg){ - const milis=Math.floor(seconds*1000); + const milis=parseInt(Math.floor(seconds*1000)); console.log('WAIT==>',seconds,title,msg); let timerInterval; Swal.fire({ @@ -20,7 +20,7 @@ class WafleModal{ Swal.showLoading(); const timer = Swal.getPopup().querySelector("b"); timerInterval = setInterval(() => { - timer.textContent = `${Swal.getTimerLeft()}`; + timer.textContent = `${parseInt(Math.round(Swal.getTimerLeft()/1000))}`; }, 100); }, willClose: () => {