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,6 +74,7 @@ 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))
@ -144,42 +145,41 @@ struct AuthenticationView: View {
var body: some View { var body: some View {
ZStack { ZStack {
SystemBackgroundView(anchor: .center) SystemBackgroundView(anchor: .center)
GeometryReader { geometry in
VStack { VStack {
Spacer()
Image(systemName: "touchid") Image(systemName: "touchid")
.resizable() .resizable()
.aspectRatio(contentMode: .fit) .aspectRatio(contentMode: .fit)
.frame(width: 100)
.foregroundColor(Color(.systemRed)) .foregroundColor(Color(.systemRed))
Spacer()
Text("Touch ID Prompt") Text("Touch ID Prompt")
.font(.largeTitle) .font(.headline)
.foregroundColor(.primary) .foregroundColor(.primary)
.redacted(reason: .placeholder) .redacted(reason: .placeholder)
Spacer()
VStack { VStack {
Text("Touch ID Detail prompt.Detail two.") Text("Touch ID Detail prompt.Detail two.")
.font(.title3) .font(.caption2)
.foregroundColor(.primary) .foregroundColor(.primary)
Text("Touch ID Detail prompt.Detail two.") Text("Touch ID Detail prompt.Detail two.")
.font(.title3) .font(.caption2)
.foregroundColor(.primary) .foregroundColor(.primary)
} }
.redacted(reason: .placeholder) .redacted(reason: .placeholder)
Spacer() RoundedRectangle(cornerRadius: 5)
RoundedRectangle(cornerRadius: 10) .frame(width: geometry.size.width, height: 20, alignment: .center)
.frame(width: 275, height: 40, alignment: .center)
.foregroundColor(.accentColor) .foregroundColor(.accentColor)
RoundedRectangle(cornerRadius: 10) RoundedRectangle(cornerRadius: 5)
.frame(width: 275, height: 40, alignment: .center) .frame(width: geometry.size.width, height: 20, alignment: .center)
.foregroundColor(Color(.unemphasizedSelectedContentBackgroundColor)) .foregroundColor(Color(.unemphasizedSelectedContentBackgroundColor))
} }
}
.padding() .padding()
.frame(width: 150)
.background( .background(
RoundedRectangle(cornerRadius: 15) RoundedRectangle(cornerRadius: 15)
.foregroundStyle(.ultraThickMaterial) .foregroundStyle(.ultraThickMaterial)
) )
.padding() .padding()
} }
} }