From 2459f7ac29b5549f3b1dda0ab568d41b923c3c32 Mon Sep 17 00:00:00 2001 From: Josh Heyse Date: Sat, 30 Jan 2021 21:39:02 -0600 Subject: [PATCH] Changed checkbox to radio button for clearer UI. --- Secretive/Views/CreateSecretView.swift | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Secretive/Views/CreateSecretView.swift b/Secretive/Views/CreateSecretView.swift index 5753932..5746722 100644 --- a/Secretive/Views/CreateSecretView.swift +++ b/Secretive/Views/CreateSecretView.swift @@ -2,10 +2,10 @@ import SwiftUI import SecretKit struct CreateSecretView: View { - + @ObservedObject var store: StoreType @Binding var showing: Bool - + @State private var name = "" @State private var requiresAuthentication = true @@ -26,8 +26,12 @@ struct CreateSecretView: View { TextField("Shhhhh", text: $name).focusable() } HStack { - Toggle(isOn: $requiresAuthentication) { - Text("Requires Authentication (Biometrics or Password)") + VStack(spacing: 20) { + Picker("", selection: $requiresAuthentication) { + Text("Requires authentication (Biometrics or Password) before each use").tag(true) + Text("Does not require authentication for each use once the user unlocks the computer").tag(false) + } + .pickerStyle(RadioGroupPickerStyle()) } Spacer() } @@ -45,7 +49,7 @@ struct CreateSecretView: View { } }.padding() } - + func save() { try! store.create(name: name, requiresAuthentication: requiresAuthentication) showing = false