From 5b620e7044ac5072871a173b5d0d52c04c1e7787 Mon Sep 17 00:00:00 2001 From: Kaisa Kuivalahti Date: Tue, 10 Sep 2024 11:05:31 +0300 Subject: [PATCH] Remove sections Tapping the Send invite button was also taking tapping gestures elsewhere. --- Palace/Settings/NewSettings/DependentsView.swift | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Palace/Settings/NewSettings/DependentsView.swift b/Palace/Settings/NewSettings/DependentsView.swift index 42077c86..15b598bf 100644 --- a/Palace/Settings/NewSettings/DependentsView.swift +++ b/Palace/Settings/NewSettings/DependentsView.swift @@ -85,12 +85,9 @@ struct DependentsView: View { Text(tsx.dependents) .font(Font(uiFont: UIFont.palaceFont(ofSize: 16))) Spacer() - .aspectRatio(contentMode: .fit) - .frame(width: 200) } } - Section { VStack { // This is where it starts, the user taps the button to get their children/dependents Button{ @@ -110,7 +107,6 @@ struct DependentsView: View { ProgressView() } - Section { VStack { // Once the request to Loikka has been made, this section becomes visible if showPicker { @@ -139,9 +135,7 @@ struct DependentsView: View { Alert(title: Text(tsxgeneric.error), message: Text(alertMessage), dismissButton: .default(Text(tsxgeneric.ok))) } .font(Font(uiFont: UIFont.palaceFont(ofSize: 16))) - } } - } // If the user has selected a dependent, we show them an email text field if id != "" { @@ -154,13 +148,13 @@ struct DependentsView: View { TextField(tsx.enterEmail, text: $inputEmail) .font(Font(uiFont: UIFont.palaceFont(ofSize: 16))) .padding() - .border(Color(uiColor: .lightGray), width: 1) - .cornerRadius(3) + .textFieldStyle(RoundedBorderTextFieldStyle()) .disableAutocorrection(true) .autocapitalization(.none) .keyboardType(.emailAddress) Spacer() - + } + VStack { // Tapping this button will send out the invite Button { sendInviteToDependent(dependentId: id) @@ -173,6 +167,8 @@ struct DependentsView: View { .foregroundColor(Color(uiColor: .lightGray)) } .padding(10) + .frame(maxWidth: .infinity, alignment: .center) + } }