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
@@ -18,7 +18,7 @@ struct MessagesView: View {
AIStatusBanner(errorMessage, tint: AITheme.warning, systemImage: "exclamationmark.triangle")
}
if model.isLoading && model.filteredRows.isEmpty {
AILoadingCard("正在同步消息")
AILoadingCard("正在同步消息数据")
}
if model.filteredRows.isEmpty && !model.isLoading {
AICard {
@@ -73,12 +73,13 @@ struct MessagesView: View {
private var filterBar: some View {
AICard {
VStack(spacing: 10) {
Picker("方向", selection: $model.direction) {
ForEach(MessagesViewModel.DirectionFilter.allCases) { item in
Text(item.rawValue).tag(item)
AISegmentedControl(
"消息方向",
selection: $model.direction,
options: MessagesViewModel.DirectionFilter.allCases.map {
(value: $0, title: $0.rawValue)
}
}
.pickerStyle(.segmented)
)
Picker("实例", selection: $model.selectedInstanceID) {
Text("全部实例").tag(Optional<UUID>.none)
@@ -100,6 +101,9 @@ struct MessagesView: View {
HStack(spacing: 8) {
Text(message.phoneNumber.isEmpty ? "未知号码" : message.phoneNumber)
.font(.headline)
.lineLimit(1)
.truncationMode(.middle)
.layoutPriority(1)
Spacer()
AITag(message.direction.label, tint: message.direction == .outgoing ? AITheme.primary : AITheme.success)
}
@@ -107,16 +111,18 @@ struct MessagesView: View {
.font(.subheadline)
.foregroundStyle(AITheme.ink)
.fixedSize(horizontal: false, vertical: true)
HStack {
HStack(alignment: .center, spacing: 10) {
Text(message.instanceName)
.font(.caption)
.foregroundStyle(AITheme.muted)
.lineLimit(1)
.truncationMode(.middle)
.layoutPriority(1)
Spacer()
Button("删除") {
Spacer(minLength: 8)
Button {
pendingDeleteMessage = message
} label: {
Label("删除", systemImage: "trash")
}
.buttonStyle(
AIButtonStyle(