feat(network): 按概念图重排网络卡片与状态摘要

This commit is contained in:
2026-11-03 17:16:41 +08:00
parent 54abb08420
commit c17d974161
6 changed files with 112 additions and 22 deletions
+4
View File
@@ -6,6 +6,8 @@ struct ResourceCard<Content: View>: View {
let color: Color
let value: String
var secondaryValue: String? = nil
var valueColor: Color? = nil
var secondaryValueColor: Color? = nil
var status: String? = nil
var statusWarning = false
var statusHelp: Text? = nil
@@ -42,8 +44,10 @@ struct ResourceCard<Content: View>: View {
HStack(alignment: .center, spacing: 6) {
AnimatedMetricText(value: value)
.font(.system(size: 13, weight: .semibold))
.foregroundStyle(valueColor ?? color)
if let secondaryValue {
AnimatedMetricText(value: secondaryValue).font(.system(size: 13, weight: .semibold))
.foregroundStyle(secondaryValueColor ?? color)
}
}.foregroundStyle(color).lineLimit(1).minimumScaleFactor(0.65)
}