PWD-7: apply styling to add-password form #8

Merged
MarkusThielker merged 2 commits from 7-apply-styling-to-add-password-form into development 2025-01-24 16:51:30 +00:00
Showing only changes of commit 083ca1f030 - Show all commits

View file

@ -37,6 +37,16 @@ struct AddPasswordView: View {
.font(.footnote)
HStack {
PwdButton(label: Text("Save")) {
if name.isEmpty || value.isEmpty {
let alert = NSAlert()
alert.messageText = "Missing values"
alert.informativeText = "Make sure to fill in both name and value!"
alert.addButton(withTitle: "Okay")
alert.runModal()
return
}
viewModel.createPassword(name: name, value: value)
name = ""
value = ""