From 16f87b89cbed72eca5b62b0a022ed012bec2fcd3 Mon Sep 17 00:00:00 2001 From: Gadgetmies Date: Tue, 5 Aug 2025 20:25:40 +0300 Subject: [PATCH] Add completion time estimate --- public/assets/js/picoreflow.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/assets/js/picoreflow.js b/public/assets/js/picoreflow.js index 82cefc5..85a78e9 100644 --- a/public/assets/js/picoreflow.js +++ b/public/assets/js/picoreflow.js @@ -556,9 +556,15 @@ $(document).ready(function() left = parseInt(x.totaltime-x.runtime); eta = new Date(left * 1000).toISOString().substr(11, 8); + const now = new Date(); + const eta_time = (new Date(now.getTime() + (left - now.getTimezoneOffset() * 60) * 1000)).toISOString().substring(11, 19); updateProgress(parseFloat(x.runtime)/parseFloat(x.totaltime)*100); - $('#state').html('' + eta + ''); + $('#state').html( + ' ' + + '' + eta + ' ' + + ''); $('#target_temp').html(parseInt(x.target)); $('#cost').html(x.currency_type + parseFloat(x.cost).toFixed(2));