mirror of
https://github.com/maxgoedjen/secretive.git
synced 2024-11-24 22:47:06 +00:00
Remove one tag
This commit is contained in:
parent
9a40c8ea7e
commit
fb752240b5
@ -4,28 +4,27 @@ import SecretKit
|
||||
struct ContentView: View {
|
||||
|
||||
@ObservedObject var store: SecureEnclave.Store
|
||||
@State var active: SecureEnclave.Secret?
|
||||
@State var active: SecureEnclave.Secret.ID?
|
||||
|
||||
@State var showingDeletion = false
|
||||
@State var deletingSecret: SecureEnclave.Secret?
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
List(selection: self.$active) {
|
||||
List(selection: $active) {
|
||||
Section(header: Text(store.name)) {
|
||||
ForEach(store.secrets) { secret in
|
||||
NavigationLink(destination: SecretDetailView(secret: secret), tag: secret, selection: self.$active) {
|
||||
NavigationLink(destination: SecretDetailView(secret: secret), tag: secret.id, selection: self.$active) {
|
||||
Text(secret.name)
|
||||
}.contextMenu {
|
||||
Button(action: { self.delete(secret: secret) }) {
|
||||
Text("Delete")
|
||||
}
|
||||
}
|
||||
.tag(secret)
|
||||
}
|
||||
}
|
||||
}.onAppear {
|
||||
self.active = self.store.secrets.first
|
||||
self.active = self.store.secrets.first?.id
|
||||
}
|
||||
.listStyle(SidebarListStyle())
|
||||
.frame(minWidth: 100, idealWidth: 240)
|
||||
|
Loading…
Reference in New Issue
Block a user