chore(project): 统一回归入口并清理审评遗留问题

This commit is contained in:
2026-11-03 22:12:44 +08:00
parent c8d7326a80
commit 0429be2b2d
8 changed files with 233 additions and 13 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ import AppKit
AppLocalization.string("status." + key, locale: language.locale, table: "StatusItem")
}, openSettings: { [weak self] in self?.settingsCommand() }) { [self] panel in
AppLanguageScope(preferences: language) {
MenuPanelView(metrics: metrics, preferences: appearance, keepAwake: awake, settingsPresentation: presentation,
MenuPanelView(metrics: self.metrics, preferences: self.appearance, keepAwake: self.awake, settingsPresentation: self.presentation,
presentation: panel, onOpenSettings: { [weak self] in
self?.menuBar?.hide()
settings.environment.openSettings()
@@ -1,7 +1,7 @@
import Foundation
/// Uses the System Information report's own maximum-capacity field.
/// Slow-changing data is cached independently of the two-second resource samples.
/// Slow-changing data has its own cache, independent of the configurable resource interval.
actor SystemBatteryHealthMonitor {
private var cached: Double?
private var nextRead: TimeInterval = 0
+1 -1
View File
@@ -100,7 +100,7 @@ struct CPUCoreGrid: View {
.frame(width: diameter, height: diameter)
.frame(width: proxy.size.width, height: proxy.size.height)
}
.help((kind.map { label($0) + Text(verbatim: " · ") } ?? Text("cpu.core")) + Text(verbatim: "\(index + 1): \(MetricFormat.percent(value))"))
.help(Text("\(kind.map { label($0) } ?? Text("cpu.core")) · \(index + 1): \(MetricFormat.percent(value))"))
.accessibilityLabel(kind.map { label($0) } ?? Text("cpu.core"))
.accessibilityValue("\(index + 1): \(MetricFormat.percent(value))")
}
+2 -1
View File
@@ -34,7 +34,8 @@ struct AppearanceStyle: ViewModifier {
}
}
/// Explicitly clear the NSWindow override when returning to system appearance.
/// Apply the resolved light/dark choice to native hosts and child windows.
/// AppearanceStyle observes the system independently and reapplies its resolved choice.
private struct WindowAppearanceBridge: NSViewRepresentable {
let choice: AppAppearance
func makeNSView(context: Context) -> AppearanceView { AppearanceView() }