This commit is contained in:
Max Goedjen
2024-12-25 18:25:01 -05:00
parent 8ea8f0510c
commit 2dc317d398
26 changed files with 208 additions and 188 deletions

View File

@@ -3,7 +3,7 @@ import SecretKit
struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
@ObservedObject var store: StoreType
@State var store: StoreType
@Binding var showing: Bool
@State private var name = ""
@@ -45,7 +45,8 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
}
func save() {
try! store.create(name: name, requiresAuthentication: requiresAuthentication)
// FIXME: THIS
// try! store.create(name: name, requiresAuthentication: requiresAuthentication)
showing = false
}
@@ -93,14 +94,14 @@ struct ThumbnailPickerView<ValueType: Hashable>: View {
extension ThumbnailPickerView {
struct Item<ValueType: Hashable>: Identifiable {
struct Item<InnerValueType: Hashable>: Identifiable {
let id = UUID()
let value: ValueType
let value: InnerValueType
let name: LocalizedStringKey
let description: LocalizedStringKey
let thumbnail: AnyView
init<ViewType: View>(value: ValueType, name: LocalizedStringKey, description: LocalizedStringKey, thumbnail: ViewType) {
init<ViewType: View>(value: InnerValueType, name: LocalizedStringKey, description: LocalizedStringKey, thumbnail: ViewType) {
self.value = value
self.name = name
self.description = description