mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-07-03 11:11:42 +00:00
WIP
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user