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:
Diffstat (limited to 'web/assets')
-rw-r--r--web/assets/js/util/common.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js
index ab642849..d35c5208 100644
--- a/web/assets/js/util/common.js
+++ b/web/assets/js/util/common.js
@@ -22,6 +22,19 @@ function sizeFormat(size) {
}
}
+function cpuSpeedFormat(speed) {
+ const GHz = speed / 1000;
+ return GHz.toFixed(2) + " GHz";
+}
+
+function cpuCoreFormat(cores) {
+ if (cores === 1) {
+ return "1 Core";
+ } else {
+ return cores + " Cores";
+ }
+}
+
function base64(str) {
return Base64.encode(str);
}