Cleanup new sheet

This commit is contained in:
Max Goedjen 2020-03-07 00:00:09 -08:00
parent 5c8bcd9e78
commit 7e5fc3cb24
No known key found for this signature in database
GPG Key ID: E58C21DD77B9B8E8
1 changed files with 36 additions and 25 deletions

View File

@ -11,16 +11,30 @@ struct CreateSecureEnclaveSecretView: View {
var dismissalBlock: () -> ()
var body: some View {
Form {
Section(header: Text("Secret Name")) {
VStack {
HStack {
Image(nsImage: NSApp.applicationIconImage)
.resizable()
.frame(width: 64, height: 64)
.padding()
VStack {
HStack {
Text("Create a New Secret").bold()
Spacer()
}
HStack {
Text("Name:")
TextField("Name", text: $name)
}
Section {
HStack {
Toggle(isOn: $requiresAuthentication) {
Text("Requires Authentication (Biometrics or Password)")
}
Spacer()
}
}
.onExitCommand(perform: dismissalBlock)
}
Section {
HStack {
Spacer()
Button(action: dismissalBlock) {
@ -30,10 +44,7 @@ struct CreateSecureEnclaveSecretView: View {
Text("Create")
}.disabled(name.isEmpty)
}
}
}
.padding()
.onExitCommand(perform: dismissalBlock)
}.padding()
}
func save() {