Allow after first unlock accessibility (#871)

* Allow after first unlock

* Fix tests

* Fix tests
This commit is contained in:
Max Goedjen authored and GitHub committed 2026-11-17 20:28:30 -08:00
1 parent 0d1ca5e744
commit c0562ba50a
14 files changed
+50 -13

No files matched your search

@@ -15,6 +15,7 @@ extension Preview {
Attributes(
keyType: .init(algorithm: .ecdsa, size: 256),
authentication: .presenceRequired,
allowWhileLocked: true,
)
}
}
@@ -10,6 +10,7 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
@State private var name = ""
@State private var keyAttribution = ""
@State private var authenticationRequirement: AuthenticationRequirement = .presenceRequired
@State private var allowWhileLocked = false
@State private var keyType: KeyType?
@State var advanced = false
@State var errorText: String?
@@ -73,6 +74,12 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
}
if advanced {
Section {
Toggle(isOn: $allowWhileLocked) {
Text(.createSecretAllowWhileLockedLabel)
Text(.createSecretAllowWhileLockedDescription)
.font(.subheadline)
.foregroundStyle(.secondary)
}
VStack {
Picker(.createSecretKeyTypeLabel, selection: $keyType) {
ForEach(store.supportedKeyTypes.available, id: \.self) { option in
@@ -146,6 +153,7 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
attributes: .init(
keyType: keyType!,
authentication: authenticationRequirement,
allowWhileLocked: allowWhileLocked,
publicKeyAttribution: attribution
)
)