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
@@ -28,9 +28,7 @@ struct SendMessageFormView: View {
AICard {
VStack(alignment: .leading, spacing: 14) {
VStack(alignment: .leading, spacing: 6) {
Text("实例")
.font(.subheadline.weight(.semibold))
.foregroundStyle(AITheme.ink)
AIFieldLabel("实例")
Picker("实例", selection: Binding(
get: { model.selectedInstanceID ?? model.instances.first?.id },
set: { model.selectedInstanceID = $0 }
@@ -43,23 +41,21 @@ struct SendMessageFormView: View {
.aiSelectSurface()
}
TextField("收件号码", text: $phoneNumber)
.textFieldStyle(AIFieldStyle())
#if os(iOS)
.keyboardType(.phonePad)
#endif
VStack(alignment: .leading, spacing: 6) {
AIFieldLabel("收件号码")
TextField("收件号码", text: $phoneNumber)
.textFieldStyle(AIFieldStyle())
#if os(iOS)
.keyboardType(.phonePad)
#endif
}
TextField("消息内容", text: $content, axis: .vertical)
.textFieldStyle(.plain)
.padding(.horizontal, 12)
.frame(minHeight: AITheme.buttonHeight)
.background(AITheme.canvas)
.clipShape(RoundedRectangle(cornerRadius: AITheme.buttonRadius))
.overlay {
RoundedRectangle(cornerRadius: AITheme.buttonRadius)
.strokeBorder(AITheme.line)
}
.lineLimit(4...8)
VStack(alignment: .leading, spacing: 6) {
AIFieldLabel("消息内容")
TextField("消息内容", text: $content, axis: .vertical)
.textFieldStyle(AIFieldStyle())
.lineLimit(4...8)
}
}
}
if let validationMessage {
@@ -73,17 +69,13 @@ struct SendMessageFormView: View {
.aiBottomActionBar {
HStack(spacing: 10) {
Button("取消") { dismiss() }
.buttonStyle(
AIButtonStyle(
kind: .secondary,
size: .regular,
fixedWidth: AITheme.footerSecondaryButtonWidth
)
)
.buttonStyle(AIButtonStyle(kind: .secondary, size: .regular, fillsWidth: true))
.frame(maxWidth: .infinity)
Button("发送") { send() }
.buttonStyle(AIButtonStyle(kind: .primary, size: .regular, fillsWidth: true))
.disabled(!canSend)
.frame(maxWidth: .infinity)
}
}
}