mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-03 09:06:36 +08:00
Merge branch 'main' into opencode/lucky-comet
This commit is contained in:
@@ -275,9 +275,13 @@ export default function PanelSharingPage() {
|
|||||||
|
|
||||||
const formatFlowGB = (bytes: number) => {
|
const formatFlowGB = (bytes: number) => {
|
||||||
if (!Number.isFinite(bytes) || bytes <= 0) {
|
if (!Number.isFinite(bytes) || bytes <= 0) {
|
||||||
return "0.00 GB";
|
return "0 B";
|
||||||
}
|
}
|
||||||
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
if (bytes < 1024) return bytes + " B";
|
||||||
|
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(2) + " KB";
|
||||||
|
if (bytes < 1024 * 1024 * 1024)
|
||||||
|
return (bytes / (1024 * 1024)).toFixed(2) + " MB";
|
||||||
|
return (bytes / (1024 * 1024 * 1024)).toFixed(2) + " GB";
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatChainType = (chainType: number, hopInx: number) => {
|
const formatChainType = (chainType: number, hopInx: number) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user