This commit is contained in:
Max Goedjen 2022-03-02 20:32:22 -08:00
parent 13f30f0343
commit 4cab679abd
No known key found for this signature in database
GPG Key ID: E58C21DD77B9B8E8

View File

@ -26,8 +26,8 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
} }
if #available(macOS 12.0, *) { if #available(macOS 12.0, *) {
ThumbnailPickerView(items: [ ThumbnailPickerView(items: [
ThumbnailPickerView.Item(name: "Requires Authentication Before Use", description: "You will be required to authenticate using Touch ID, Apple Watch, or password before each use.", thumbnail: AuthenticationView()), ThumbnailPickerView.Item(name: "Require Authentication", description: "You will be required to authenticate using Touch ID, Apple Watch, or password before each use.", thumbnail: AuthenticationView()),
ThumbnailPickerView.Item(name: "Notify on Use", ThumbnailPickerView.Item(name: "Notify",
description: "No authentication is required while your Mac is unlocked.", description: "No authentication is required while your Mac is unlocked.",
thumbnail: NotificationView()) thumbnail: NotificationView())
], selection: $test) ], selection: $test)
@ -74,10 +74,11 @@ struct ThumbnailPickerView: View {
ForEach(items) { item in ForEach(items) { item in
VStack { VStack {
item.thumbnail item.thumbnail
.frame(width: 250, height: 200)
.clipShape(RoundedRectangle(cornerRadius: 10)) .clipShape(RoundedRectangle(cornerRadius: 10))
.overlay(RoundedRectangle(cornerRadius: 10) .overlay(RoundedRectangle(cornerRadius: 10)
.stroke(lineWidth: item.id == selection.id ? 5 : 0)) .stroke(lineWidth: item.id == selection.id ? 5 : 0))
.foregroundColor(.accentColor) .foregroundColor(.accentColor)
Text(item.name) Text(item.name)
.bold() .bold()
Text(item.description) Text(item.description)
@ -144,42 +145,41 @@ struct AuthenticationView: View {
var body: some View { var body: some View {
ZStack { ZStack {
SystemBackgroundView(anchor: .center) SystemBackgroundView(anchor: .center)
VStack { GeometryReader { geometry in
Spacer()
Image(systemName: "touchid")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 100)
.foregroundColor(Color(.systemRed))
Spacer()
Text("Touch ID Prompt")
.font(.largeTitle)
.foregroundColor(.primary)
.redacted(reason: .placeholder)
Spacer()
VStack { VStack {
Text("Touch ID Detail prompt.Detail two.") Image(systemName: "touchid")
.font(.title3) .resizable()
.foregroundColor(.primary) .aspectRatio(contentMode: .fit)
Text("Touch ID Detail prompt.Detail two.") .foregroundColor(Color(.systemRed))
.font(.title3) Text("Touch ID Prompt")
.font(.headline)
.foregroundColor(.primary) .foregroundColor(.primary)
.redacted(reason: .placeholder)
VStack {
Text("Touch ID Detail prompt.Detail two.")
.font(.caption2)
.foregroundColor(.primary)
Text("Touch ID Detail prompt.Detail two.")
.font(.caption2)
.foregroundColor(.primary)
}
.redacted(reason: .placeholder)
RoundedRectangle(cornerRadius: 5)
.frame(width: geometry.size.width, height: 20, alignment: .center)
.foregroundColor(.accentColor)
RoundedRectangle(cornerRadius: 5)
.frame(width: geometry.size.width, height: 20, alignment: .center)
.foregroundColor(Color(.unemphasizedSelectedContentBackgroundColor))
} }
.redacted(reason: .placeholder)
Spacer()
RoundedRectangle(cornerRadius: 10)
.frame(width: 275, height: 40, alignment: .center)
.foregroundColor(.accentColor)
RoundedRectangle(cornerRadius: 10)
.frame(width: 275, height: 40, alignment: .center)
.foregroundColor(Color(.unemphasizedSelectedContentBackgroundColor))
} }
.padding() .padding()
.frame(width: 150)
.background( .background(
RoundedRectangle(cornerRadius: 15) RoundedRectangle(cornerRadius: 15)
.foregroundStyle(.ultraThickMaterial) .foregroundStyle(.ultraThickMaterial)
) )
.padding() .padding()
} }
} }