mirror of
https://github.com/maxgoedjen/secretive.git
synced 2024-12-22 04:07:09 +00:00
Switch stuff to popovers to behave better in Big Sur (#163)
* Moving create to a popover. * Switch to popover here too
This commit is contained in:
parent
edf01cc6d4
commit
59ec40c611
@ -23,11 +23,6 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
||||
NoStoresView()
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showingCreation) {
|
||||
if let modifiable = storeList.modifiableStore {
|
||||
CreateSecretView(store: modifiable, showing: $showingCreation)
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 640, minHeight: 320)
|
||||
.toolbar {
|
||||
updateNotice
|
||||
@ -83,6 +78,12 @@ extension ContentView {
|
||||
}, label: {
|
||||
Image(systemName: "plus")
|
||||
})
|
||||
.popover(isPresented: $showingCreation, attachmentAnchor: .point(.bottom), arrowEdge: .bottom) {
|
||||
if let modifiable = storeList.modifiableStore {
|
||||
CreateSecretView(store: modifiable, showing: $showingCreation)
|
||||
}
|
||||
}
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ struct SecretListView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.sheet(item: $deletingSecret) { secret in
|
||||
.popover(isPresented: .constant(deletingSecret == secret)) {
|
||||
if let modifiable = store as? AnySecretStoreModifiable {
|
||||
DeleteSecretView(store: modifiable, secret: secret) { deleted in
|
||||
deletingSecret = nil
|
||||
@ -30,6 +30,7 @@ struct SecretListView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user