From 8244964e5c490a270fef7c7bbc10b5678ac1fb2a Mon Sep 17 00:00:00 2001 From: Dmitriy Holovnia Date: Fri, 15 Apr 2022 13:55:45 +0300 Subject: [PATCH] remove micro image --- .../Components/Picker/SearchBarView.swift | 27 +++++++------------ .../PreboardingView/PreboardingView.swift | 4 +-- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/o-fish-ios/Views/Components/Picker/SearchBarView.swift b/o-fish-ios/Views/Components/Picker/SearchBarView.swift index 5754326f..be4c045e 100644 --- a/o-fish-ios/Views/Components/Picker/SearchBarView.swift +++ b/o-fish-ios/Views/Components/Picker/SearchBarView.swift @@ -36,17 +36,7 @@ struct SearchBarView: View { onCommit: onCommit) .font(.body) - if searchText.isEmpty { - Button(action: { - //TODO: use microphone to input search string - print("Microphone button tapped") - }) { - Image(systemName: "mic.fill") - } - .alert(isPresented: $showingAlert) { - Alert(title: Text("Error"), message: Text("\(errorText)"), dismissButton: .default(Text("Ok"))) - } - } else { + if !searchText.isEmpty { Button(action: { self.searchText = "" self.clickedDelete() @@ -55,12 +45,15 @@ struct SearchBarView: View { } } } - .padding(EdgeInsets(top: Dimension.inset, leading: Dimension.bottomInset, bottom: Dimension.inset, trailing: Dimension.inset)) - .frame(height: Dimension.heightTextField) - .foregroundColor(.secondary) - .background(Color.oSearchBar) - .cornerRadius(Dimension.cornerRadius) - .padding([.horizontal, .top], Dimension.padding) + .alert(isPresented: $showingAlert) { + Alert(title: Text("Error"), message: Text("\(errorText)"), dismissButton: .default(Text("Ok"))) + } + .padding(EdgeInsets(top: Dimension.inset, leading: Dimension.bottomInset, bottom: Dimension.inset, trailing: Dimension.inset)) + .frame(height: Dimension.heightTextField) + .foregroundColor(.secondary) + .background(Color.oSearchBar) + .cornerRadius(Dimension.cornerRadius) + .padding([.horizontal, .top], Dimension.padding) Divider() .frame(height: 1.0) diff --git a/o-fish-ios/Views/PreboardingFlow/PreboardingView/PreboardingView.swift b/o-fish-ios/Views/PreboardingFlow/PreboardingView/PreboardingView.swift index 1d7fc70d..a7ba3f13 100644 --- a/o-fish-ios/Views/PreboardingFlow/PreboardingView/PreboardingView.swift +++ b/o-fish-ios/Views/PreboardingFlow/PreboardingView/PreboardingView.swift @@ -49,7 +49,7 @@ struct PreboardingView: View { VStack { searchBar - + if showingAddVessel { NavigationLink(destination: ReportNavigationRootView(report: self.emptyReport, rootIsActive: $rootIsActive)) { VStack(spacing: Dimension.noSpacing) { @@ -61,7 +61,7 @@ struct PreboardingView: View { } .opacity(state == .loading ? 0.0 : 1.0) } - + stateView() Spacer() }