Skip to content

Commit

Permalink
Merge pull request #60 from NatLibFi/Fix-button-area
Browse files Browse the repository at this point in the history
Remove sections
  • Loading branch information
natlibfi-kaisa authored Sep 10, 2024
2 parents f99583e + 5b620e7 commit 8b3d230
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions Palace/Settings/NewSettings/DependentsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -110,7 +107,6 @@ struct DependentsView: View {
ProgressView()
}

Section {
VStack {
// Once the request to Loikka has been made, this section becomes visible
if showPicker {
Expand Down Expand Up @@ -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 != "" {
Expand All @@ -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)
Expand All @@ -173,6 +167,8 @@ struct DependentsView: View {
.foregroundColor(Color(uiColor: .lightGray))
}
.padding(10)
.frame(maxWidth: .infinity, alignment: .center)

}

}
Expand Down

0 comments on commit 8b3d230

Please sign in to comment.