refactor(ui): 统一资源卡片规范并收敛面板布局与公共组件
This commit is contained in:
@@ -31,7 +31,7 @@ struct PanelTrendChart: View {
|
||||
var expectedInterval: TimeInterval = 2
|
||||
var boundaryDates: Set<Date> = []
|
||||
var intervals: [TimeInterval] = []
|
||||
var plotHeight: CGFloat = 58
|
||||
var plotHeight: CGFloat = PanelStyle.plotHeight
|
||||
var showsLegendValues = true
|
||||
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
||||
@State private var retainedScale: Double = 1
|
||||
@@ -84,7 +84,7 @@ struct PanelTrendChart: View {
|
||||
if showsLegendValues {
|
||||
Text(verbatim: formatted(values.last ?? nil, format: format)).monospacedDigit()
|
||||
}
|
||||
}.font(.system(size: 9)).lineLimit(1).minimumScaleFactor(0.8)
|
||||
}.font(PanelStyle.legend).lineLimit(1).minimumScaleFactor(0.8)
|
||||
}
|
||||
|
||||
private func tooltipRow(_ label: LocalizedStringKey, values: [Double?], tint: Color, format: TrendValueFormat? = nil, index: Int) -> some View {
|
||||
@@ -181,7 +181,7 @@ struct PanelTrendChart: View {
|
||||
if let date = dates.first { Text(date, style: .time) }
|
||||
Spacer(minLength: 0)
|
||||
if let date = dates.last { Text(date, style: .time) }
|
||||
}.font(.system(size: 9)).foregroundStyle(.secondary).frame(height: 12)
|
||||
}.font(PanelStyle.legend).foregroundStyle(.secondary).frame(height: 12)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.onAppear {
|
||||
|
||||
Reference in New Issue
Block a user