This commit is contained in:
Max Goedjen 2022-12-18 15:57:03 -08:00
parent 0df1efb28b
commit 4489c46685
No known key found for this signature in database

View File

@ -27,7 +27,7 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
ThumbnailPickerView(items: [ ThumbnailPickerView(items: [
ThumbnailPickerView.Item(value: true, name: "Require Authentication", description: "You will be required to authenticate using Touch ID, Apple Watch, or password before each use.", thumbnail: AuthenticationView()), ThumbnailPickerView.Item(value: true, name: "Require Authentication", description: "You will be required to authenticate using Touch ID, Apple Watch, or password before each use.", thumbnail: AuthenticationView()),
ThumbnailPickerView.Item(value: false, name: "Notify", ThumbnailPickerView.Item(value: false, name: "Notify",
description: "No authentication is required while your Mac is unlocked.", description: "No authentication is required while your Mac is unlocked, but you will be notified when a secret is used.",
thumbnail: NotificationView()) thumbnail: NotificationView())
], selection: $requiresAuthentication) ], selection: $requiresAuthentication)
} else { } else {
@ -38,8 +38,8 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
Text("Authentication not required when Mac is unlocked").tag(false) Text("Authentication not required when Mac is unlocked").tag(false)
} }
.pickerStyle(RadioGroupPickerStyle()) .pickerStyle(RadioGroupPickerStyle())
Spacer(minLength: 10)
} }
Spacer()
} }
} }
} }
@ -77,17 +77,19 @@ struct ThumbnailPickerView<ValueType: Hashable>: View {
var body: some View { var body: some View {
HStack(alignment: .top) { HStack(alignment: .top) {
ForEach(items) { item in ForEach(items) { item in
VStack(alignment: .leading, spacing: 5) { VStack(alignment: .leading, spacing: 15) {
item.thumbnail item.thumbnail
.frame(height: 200) .frame(height: 200)
.overlay(RoundedRectangle(cornerRadius: 10) .overlay(RoundedRectangle(cornerRadius: 10)
.stroke(lineWidth: item.value == selection ? 15 : 0)) .stroke(lineWidth: item.value == selection ? 15 : 0))
.clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous)) .clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
.foregroundColor(.accentColor) .foregroundColor(.accentColor)
Text(item.name) VStack(alignment: .leading, spacing: 5) {
.bold() Text(item.name)
Text(item.description) .bold()
.fixedSize(horizontal: false, vertical: true) Text(item.description)
.fixedSize(horizontal: false, vertical: true)
}
} }
.frame(width: 250) .frame(width: 250)
.onTapGesture { .onTapGesture {