@@ -20,7 +20,7 @@ public struct EditScreen: View {
2020
2121 @State private var pickerItem : PhotosPickerItem ?
2222
23- @FocusState var isStatusFocused : Bool
23+ @FocusState var focus : EditFeature . State . Field ?
2424
2525 public init ( store: StoreOf < EditFeature > ) {
2626 self . store = store
@@ -38,20 +38,23 @@ public struct EditScreen: View {
3838 if store. isUserCanEditStatus {
3939 Field (
4040 content: Binding ( unwrapping: $store. draftUser. status, default: " " ) ,
41- title: LocalizedStringKey ( " Status " )
41+ title: LocalizedStringKey ( " Status " ) ,
42+ focusEqual: . status
4243 )
4344 } else {
4445 // TODO: Some notify about it?
4546 }
4647
4748 Field (
4849 content: Binding ( unwrapping: $store. draftUser. signature, default: " " ) ,
49- title: LocalizedStringKey ( " Signature " )
50+ title: LocalizedStringKey ( " Signature " ) ,
51+ focusEqual: . signature
5052 )
5153
5254 Field (
5355 content: Binding ( unwrapping: $store. draftUser. aboutMe, default: " " ) ,
54- title: LocalizedStringKey ( " About me " )
56+ title: LocalizedStringKey ( " About me " ) ,
57+ focusEqual: . about
5558 )
5659
5760 Section {
@@ -63,14 +66,15 @@ public struct EditScreen: View {
6366
6467 Field (
6568 content: Binding ( unwrapping: $store. draftUser. city, default: " " ) ,
66- title: LocalizedStringKey ( " City " )
69+ title: LocalizedStringKey ( " City " ) ,
70+ focusEqual: . city
6771 )
6872 }
6973 . scrollContentBackground ( . hidden)
7074 }
7175 . navigationTitle ( Text ( " Edit profile " , bundle: . module) )
7276 . navigationBarTitleDisplayMode ( . inline)
73- . safeAreaInset ( edge: . bottom) {
77+ . _safeAreaBar ( edge: . bottom) {
7478 SendButton ( )
7579 }
7680 . toolbar {
@@ -84,6 +88,10 @@ public struct EditScreen: View {
8488 . disabled ( store. isSending)
8589 }
8690 }
91+ . bind ( $store. focus, to: $focus)
92+ . onTapGesture {
93+ focus = nil
94+ }
8795 . onAppear {
8896 send ( . onAppear)
8997 }
@@ -115,7 +123,13 @@ public struct EditScreen: View {
115123 . frame ( height: 48 )
116124 . padding ( . vertical, 8 )
117125 . padding ( . horizontal, 16 )
118- . background ( Color ( . Background. primary) )
126+ . background {
127+ if #available( iOS 26 , * ) {
128+ // No background
129+ } else {
130+ Color ( . Background. primary)
131+ }
132+ }
119133 }
120134
121135 // MARK: - User Birthday Picker
@@ -286,6 +300,7 @@ public struct EditScreen: View {
286300 Image ( systemSymbol: . trash)
287301 }
288302 }
303+ . tint ( . red)
289304 }
290305 } label: {
291306 Image ( systemSymbol: . ellipsis)
@@ -306,15 +321,43 @@ public struct EditScreen: View {
306321 @ViewBuilder
307322 private func Field(
308323 content: Binding < String > ,
309- title: LocalizedStringKey
324+ title: LocalizedStringKey ,
325+ focusEqual: EditFeature . State . Field
310326 ) -> some View {
311327 Section {
312- SharedUI . Field (
313- text: content,
314- description: " " ,
315- guideText: " " ,
316- isFocused: $isStatusFocused
317- )
328+ Group {
329+ TextField ( text: content, axis: . vertical) {
330+ Text ( " Input... " , bundle: . module)
331+ . font ( . body)
332+ . foregroundStyle ( Color ( . Labels. quaternary) )
333+ }
334+ . focused ( $focus, equals: focusEqual)
335+ . font ( . body)
336+ . foregroundStyle ( Color ( . Labels. primary) )
337+ . multilineTextAlignment ( . leading)
338+ . fixedSize ( horizontal: false , vertical: true )
339+ . frame ( minHeight: nil , alignment: . top)
340+ }
341+ . padding ( . vertical, 15 )
342+ . padding ( . horizontal, 12 )
343+ . background {
344+ if #available( iOS 26 , * ) {
345+ ConcentricRectangle ( )
346+ . fill ( Color ( . Background. teritary) )
347+ } else {
348+ RoundedRectangle ( cornerRadius: 14 )
349+ . fill ( Color ( . Background. teritary) )
350+ }
351+ }
352+ . overlay {
353+ if #available( iOS 26 , * ) {
354+ ConcentricRectangle ( )
355+ . stroke ( $focus. wrappedValue == focusEqual ? tintColor : Color ( . Separator. primary) , lineWidth: 0.67 )
356+ } else {
357+ RoundedRectangle ( cornerRadius: 14 )
358+ . stroke ( $focus. wrappedValue == focusEqual ? tintColor : Color ( . Separator. primary) , lineWidth: 0.67 )
359+ }
360+ }
318361 } header: {
319362 Header ( title: title)
320363 }
0 commit comments