mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 05:51:56 +08:00
Fix: connection overlap on English
This commit is contained in:
parent
a46ac3456f
commit
13fa9b96bb
@ -85,8 +85,8 @@ const EN = {
|
||||
dstIP: 'IP',
|
||||
dstIPEmpty: 'Empty',
|
||||
srcIP: 'Source',
|
||||
upload: 'Upload',
|
||||
download: 'Download',
|
||||
upload: 'Up',
|
||||
download: 'Down',
|
||||
network: 'Network',
|
||||
process: 'Process',
|
||||
processPath: 'Path',
|
||||
|
@ -13,7 +13,7 @@ export function partition<T> (arr: T[], fn: (arg: T) => boolean): [T[], T[]] {
|
||||
}
|
||||
|
||||
export function formatTraffic (num: number) {
|
||||
const s = ['B', 'KB', 'MB', 'GB', 'TB']
|
||||
const s = ['B', 'KiB', 'MiB', 'GiB', 'TiB']
|
||||
const exp = Math.floor(Math.log(num || 1) / Math.log(1024))
|
||||
return `${floor(num / Math.pow(1024, exp), 2).toFixed(2)} ${s?.[exp] ?? ''}`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user