// // MenuPanelView.swift // kymo // // Created by Airnan on 2026/10/29. // import SwiftUI /// A 阶段临时面板:展示采样时间与暂停入口,正式面板在 B 阶段实现。 struct MenuPanelView: View { let metrics: MetricsStore var body: some View { VStack(alignment: .leading, spacing: 12) { Label("Kymo 资源监控", systemImage: "gauge") .font(.headline) Text(metrics.snapshot.date, style: .time) Button(metrics.isPaused ? "继续监控" : "暂停监控") { metrics.togglePause() } Text("GPU 暂不可用") .font(.subheadline) .foregroundStyle(.secondary) } .padding(16) .frame(width: 280, alignment: .leading) } } #Preview { MenuPanelView(metrics: MetricsStore()) }