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 {
|
struct ContentView: View {
|
||||||
|
|
||||||
@ObservedObject var store: SecureEnclave.Store
|
@ObservedObject var store: SecureEnclave.Store
|
||||||
@State var active: SecureEnclave.Secret?
|
@State var active: SecureEnclave.Secret.ID?
|
||||||
|
|
||||||
@State var showingDeletion = false
|
@State var showingDeletion = false
|
||||||
@State var deletingSecret: SecureEnclave.Secret?
|
@State var deletingSecret: SecureEnclave.Secret?
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
List(selection: self.$active) {
|
List(selection: $active) {
|
||||||
Section(header: Text(store.name)) {
|
Section(header: Text(store.name)) {
|
||||||
ForEach(store.secrets) { secret in
|
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)
|
Text(secret.name)
|
||||||
}.contextMenu {
|
}.contextMenu {
|
||||||
Button(action: { self.delete(secret: secret) }) {
|
Button(action: { self.delete(secret: secret) }) {
|
||||||
Text("Delete")
|
Text("Delete")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tag(secret)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.onAppear {
|
}.onAppear {
|
||||||
self.active = self.store.secrets.first
|
self.active = self.store.secrets.first?.id
|
||||||
}
|
}
|
||||||
.listStyle(SidebarListStyle())
|
.listStyle(SidebarListStyle())
|
||||||
.frame(minWidth: 100, idealWidth: 240)
|
.frame(minWidth: 100, idealWidth: 240)
|
||||||
|
Loading…
Reference in New Issue
Block a user