mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-10 17:47:19 +00:00
Clean up
This commit is contained in:
parent
0df1efb28b
commit
4489c46685
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user