fff
This commit is contained in:
@@ -233,6 +233,7 @@ struct SentenceExplanationSheet: View {
|
||||
let courseTitle: String
|
||||
let sentence: SentenceBoundary
|
||||
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
@State private var explanation = ""
|
||||
@State private var errorMessage: String?
|
||||
|
||||
@@ -264,6 +265,18 @@ struct SentenceExplanationSheet: View {
|
||||
.background(Color.white.ignoresSafeArea())
|
||||
.navigationTitle("句子讲解")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.font(.system(size: 22, weight: .semibold))
|
||||
.foregroundColor(Theme.textMuted)
|
||||
}
|
||||
.accessibilityLabel("关闭句子讲解")
|
||||
}
|
||||
}
|
||||
}
|
||||
.task {
|
||||
guard explanation.isEmpty, errorMessage == nil else { return }
|
||||
|
||||
Reference in New Issue
Block a user