Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/assets/js/util/common.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js
index d35c5208..563bfd45 100644
--- a/web/assets/js/util/common.js
+++ b/web/assets/js/util/common.js
@@ -23,8 +23,12 @@ function sizeFormat(size) {
}
function cpuSpeedFormat(speed) {
- const GHz = speed / 1000;
- return GHz.toFixed(2) + " GHz";
+ if (speed > 1000) {
+ const GHz = speed / 1000;
+ return GHz.toFixed(2) + " GHz";
+ } else {
+ return speed.toFixed(2) + " MHz";
+ }
}
function cpuCoreFormat(cores) {