feat: extend SMS signature and setting file support #28

Merged
shiran merged 7 commits from master into deploy 2026-07-24 22:07:30 +08:00
Showing only changes of commit c9e8f2ae15 - Show all commits
+8 -1
View File
@@ -1567,7 +1567,14 @@ const getMetricTopBarPercent = (value) => {
const formatMetricTopValue = (item) => {
const value = Number(item?.value) || 0
if (item?.unit === '%' || metricTopMetric.value.endsWith('_percent')) return `${value.toFixed(2)}%`
return formatSpeedAuto(value)
const units = [
{ threshold: 1073741824, divisor: 1073741824, label: 'GB/s' },
{ threshold: 1048576, divisor: 1048576, label: 'MB/s' },
{ threshold: 1024, divisor: 1024, label: 'KB/s' }
]
const unit = units.find(option => Math.abs(value) >= option.threshold)
if (unit) return `${(value / unit.divisor).toFixed(2)} ${unit.label}`
return `${value.toFixed(2)} B/s`
}
const formatMetricTopSampleTime = (value) => {