mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-10 17:47:19 +00:00
Cleanup.
This commit is contained in:
parent
61feb5b7af
commit
4c7e8be740
@ -53,8 +53,8 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
||||
}
|
||||
.frame(minWidth: 100, idealWidth: 240)
|
||||
.sheet(item: $deletingSecret) { secret in
|
||||
if storeList.modifiableStore != nil {
|
||||
DeleteSecretView(secret: secret, store: storeList.modifiableStore!) { deleted in
|
||||
if let store = storeList.modifiableStore {
|
||||
DeleteSecretView(secret: secret, store: store) { deleted in
|
||||
deletingSecret = nil
|
||||
if deleted {
|
||||
active = nextDefaultSecret
|
||||
@ -63,7 +63,9 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showingCreation) {
|
||||
CreateSecretView(showing: $showingCreation)
|
||||
if let store = storeList.modifiableStore {
|
||||
CreateSecretView(store: store, showing: $showingCreation)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1,13 +1,13 @@
|
||||
import SwiftUI
|
||||
import SecretKit
|
||||
|
||||
struct CreateSecretView: View {
|
||||
struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
|
||||
|
||||
@EnvironmentObject var store: AnySecretStoreModifiable
|
||||
@ObservedObject var store: StoreType
|
||||
@Binding var showing: Bool
|
||||
|
||||
@State var name = ""
|
||||
@State var requiresAuthentication = true
|
||||
@Binding var showing: Bool
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
|
Loading…
Reference in New Issue
Block a user