PWD-7: customise add-password form style

This commit is contained in:
Markus Thielker 2025-01-24 17:49:10 +01:00
parent 593f4fbd93
commit 737d904807
No known key found for this signature in database

View file

@ -20,30 +20,34 @@ struct AddPasswordView: View {
VStack {
VStack {
Text("Add Password")
.font(.headline)
Text("Create a new password to learn. It will be encrypted and stored securely.")
.font(.title2)
Text("Create a new password to learn.")
Text("It will be encrypted and stored securely.")
}
.padding(EdgeInsets(top: 0, leading: 0, bottom: 10, trailing: 0))
Form {
TextField("Name", text: $name)
.textFieldStyle(PwdTextFieldStyle())
TextField("Value", text: $value)
.textFieldStyle(PwdTextFieldStyle())
}
Text("The password will not be visible again later. Make sure to save it somewhere else too!")
.font(.footnote)
HStack {
Button("Save") {
PwdButton(label: Text("Save")) {
viewModel.createPassword(name: name, value: value)
name = ""
value = ""
dismiss()
}
Button("Cancel") {
PwdButton(label: Text("Cancel"), variant: .outline) {
dismiss()
}
}
.padding(EdgeInsets(top: 10, leading: 0, bottom: 0, trailing: 0))
}
}.padding(20)
}
}