feat(ios): refine adaptive theme and unified controls

This commit is contained in:
chick
2026-09-10 03:19:03 +08:00
parent c841748971
commit 31b2f33d15
12 changed files with 1161 additions and 984 deletions
@@ -14,14 +14,18 @@ struct FleetView: View {
ScrollView {
LazyVStack(spacing: 12) {
searchField
if let errorMessage = model.errorMessage {
AIStatusBanner(errorMessage, tint: AITheme.danger, systemImage: "exclamationmark.triangle")
}
if let errorMessage = model.errorMessage {
AIStatusBanner(
errorMessage,
tint: AITheme.danger,
systemImage: "exclamationmark.triangle"
)
}
if model.selectionMode {
selectionBar
}
if model.isLoading && model.rows.isEmpty {
AILoadingCard("正在同步实例")
AILoadingCard("正在同步实例数据")
}
if model.rows.isEmpty && !model.isLoading {
AICard {
@@ -58,6 +62,7 @@ struct FleetView: View {
Label("批量选择", systemImage: "checklist")
}
.buttonStyle(AIButtonStyle(kind: .secondary, size: .regular, fillsWidth: true))
.frame(maxWidth: .infinity)
Button {
model.showingForm = true
@@ -65,6 +70,7 @@ struct FleetView: View {
Label("添加实例", systemImage: "plus")
}
.buttonStyle(AIButtonStyle(kind: .primary, size: .regular, fillsWidth: true))
.frame(maxWidth: .infinity)
}
}
}
@@ -163,6 +169,9 @@ struct FleetView: View {
Text(row.instance.name)
.font(.headline)
.foregroundStyle(AITheme.ink)
.lineLimit(1)
.truncationMode(.middle)
.layoutPriority(1)
Spacer()
AITag(row.status.label, tint: statusColor(row.status))
}