feat(panel): 调整资源卡片读数布局并保留趋势平移
逐核显示 CPU 占用,在 GPU 标题展示核数并补充分项读数。无电池设备显示整机功率。 存储与网络将曲线排在详情下方,CPU、GPU、内存和电池保留整卡趋势。数值直接刷新,曲线随采样平滑平移。顶栏展示版本号,底栏调整开机时间和刷新间隔。
This commit is contained in:
@@ -6,11 +6,11 @@ struct StorageDetailsView: View {
|
||||
let io: DiskIOMetrics?
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
VStack(alignment: .leading, spacing: 3) {
|
||||
field("memory.available", value: MetricFormat.bytes(disk?.available))
|
||||
ViewThatFits(in: .horizontal) {
|
||||
HStack(spacing: 6) { read; write }.fixedSize(horizontal: true, vertical: true)
|
||||
VStack(alignment: .leading, spacing: 4) { read; write }
|
||||
VStack(alignment: .leading, spacing: 3) { read; write }
|
||||
}
|
||||
ViewThatFits(in: .horizontal) {
|
||||
HStack(spacing: 4) {
|
||||
@@ -18,7 +18,7 @@ struct StorageDetailsView: View {
|
||||
Text("·").foregroundStyle(.secondary)
|
||||
powerOn
|
||||
}.fixedSize(horizontal: true, vertical: true)
|
||||
VStack(alignment: .leading, spacing: 4) { life; powerOn }
|
||||
VStack(alignment: .leading, spacing: 3) { life; powerOn }
|
||||
}
|
||||
}
|
||||
.font(.system(size: 10)).lineLimit(1)
|
||||
@@ -33,6 +33,6 @@ struct StorageDetailsView: View {
|
||||
HStack(spacing: 3) {
|
||||
Text(title).foregroundStyle(.secondary).help(Text(title))
|
||||
MetricText(value: value).fontWeight(.medium).foregroundStyle(.primary)
|
||||
}.frame(height: 16)
|
||||
}.frame(height: 14)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user