feat(menubar): 实现趋势面板外侧详情与三语外观设置

接入有界趋势、平滑滚动、菜单式外侧详情、底部操作与三语文案,装配独立外观设置和 Dock 生命周期。
合并跟随系统外观刷新、自选颜色入口与色块绘制修复,保留用户确认的配色联动、重启保存及滚动验收。
多场景视觉与长期资源验证边界仍记录于 docs。
This commit is contained in:
2026-10-30 00:45:34 +08:00
parent 631b412d15
commit 0c846a2127
31 changed files with 2033 additions and 42 deletions
+15
View File
@@ -0,0 +1,15 @@
import Foundation
nonisolated enum MetricFormat {
static func percent(_ value: Double?) -> String {
guard let value, value.isFinite else { return "--" }
return "\(Int((min(1, max(0, value)) * 100).rounded()))%"
}
static func bytes(_ value: UInt64?) -> String {
guard let value else { return "--" }
return String(format: "%.1f GB", Double(value) / 1_000_000_000)
}
static func decimal(_ value: Double) -> String { String(format: "%.1f", value) }
}