diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index 7fac8f41570e..8fd9de9edf4e 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -1515,7 +1515,7 @@ window.addEventListener("DOMContentLoaded", () => { }); let prop_h = LocalPreferences.get("properties_height_rel"); if (prop_h !== null) - prop_h = prop_h.toFloat() * Window.getSize().y; + prop_h = Number(prop_h) * Window.getSize().y; else prop_h = Window.getSize().y / 2.0; new MochaUI.Panel({ diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index f45ff51a3262..ee9bf554f90c 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -1247,7 +1247,7 @@ window.qBittorrent.DynamicTable ??= (() => { else { if (progressColumnWidth < 0) progressColumnWidth = td.offsetWidth; - td.append(new window.qBittorrent.ProgressBar.ProgressBar(progressFormatted.toFloat(), { + td.append(new window.qBittorrent.ProgressBar.ProgressBar(progressFormatted, { width: progressColumnWidth - 5 })); td.resized = false; @@ -2598,17 +2598,17 @@ window.qBittorrent.DynamicTable ??= (() => { // progress this.columns["progress"].updateTd = function(td, row) { const id = row.rowId; - const value = this.getRowValue(row); + const value = Number(this.getRowValue(row)); const progressBar = $(`pbf_${id}`); if (progressBar === null) { - td.append(new window.qBittorrent.ProgressBar.ProgressBar(value.toFloat(), { + td.append(new window.qBittorrent.ProgressBar.ProgressBar(value, { id: `pbf_${id}`, width: 80 })); } else { - progressBar.setValue(value.toFloat()); + progressBar.setValue(value); } }; this.columns["progress"].staticWidth = 100; diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index 7dc1f3d424e2..727eb318d69b 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -2878,7 +2878,7 @@ // Share Ratio Limiting let max_ratio = -1; if ($("max_ratio_checkbox").checked) { - max_ratio = $("max_ratio_value").value.toFloat(); + max_ratio = Number($("max_ratio_value").value); if (isNaN(max_ratio) || (max_ratio < 0) || (max_ratio > 9998)) { alert("QBT_TR(Share ratio limit must be between 0 and 9998.)QBT_TR[CONTEXT=HttpServer]"); return;