diff --git a/coffee_scale/static/js/coffee.js b/coffee_scale/static/js/coffee.js index 32134a0..f885408 100644 --- a/coffee_scale/static/js/coffee.js +++ b/coffee_scale/static/js/coffee.js @@ -99,10 +99,14 @@ function updateBrewDiff(){ } function updateBrewTime(ev){ var timeDiff = ev.detail; - var timeStr = (timeDiff < 3600000) - ? Math.round(timeDiff / 60000) + ' min' - : '~' + Math.round(timeDiff / 3600000 * 2) / 2 + ' h'; - + var timeStr; + if (timeDiff < 3600000){ + timeStr = Math.round(timeDiff / 60000) + ' min' + } else if (timeDiff < 10000* 3600 * 1000){ // 1000h + timeStr = '~' + Math.round(timeDiff / 3600000 * 2) / 2 + ' h'; + } else { + timeStr = "???" + } $("#brewtime").html(timeStr); } diff --git a/coffee_scale/templates/coffee.html b/coffee_scale/templates/coffee.html index 5484f97..b09a25d 100644 --- a/coffee_scale/templates/coffee.html +++ b/coffee_scale/templates/coffee.html @@ -29,7 +29,7 @@