mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-12-14 21:10:56 +00:00
Reorder modifiers to fix context menus on macOS 14
This commit is contained in:
parent
595de41f03
commit
5dfeccca2f
@ -24,6 +24,18 @@ struct SecretListItemView: View {
|
|||||||
Text(secret.name)
|
Text(secret.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.sheet(isPresented: $isRenaming, onDismiss: {
|
||||||
|
renamedSecret(secret)
|
||||||
|
}, content: {
|
||||||
|
if let modifiable = store as? AnySecretStoreModifiable {
|
||||||
|
EditSecretView(store: modifiable, secret: secret)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.showingDeleteConfirmation(isPresented: $isDeleting, secret, store as? AnySecretStoreModifiable) { deleted in
|
||||||
|
if deleted {
|
||||||
|
deletedSecret(secret)
|
||||||
|
}
|
||||||
|
}
|
||||||
.contextMenu {
|
.contextMenu {
|
||||||
if store is AnySecretStoreModifiable {
|
if store is AnySecretStoreModifiable {
|
||||||
Button(action: { isRenaming = true }) {
|
Button(action: { isRenaming = true }) {
|
||||||
@ -36,17 +48,5 @@ struct SecretListItemView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.showingDeleteConfirmation(isPresented: $isDeleting, secret, store as? AnySecretStoreModifiable) { deleted in
|
|
||||||
if deleted {
|
|
||||||
deletedSecret(secret)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.sheet(isPresented: $isRenaming, onDismiss: {
|
|
||||||
renamedSecret(secret)
|
|
||||||
}, content: {
|
|
||||||
if let modifiable = store as? AnySecretStoreModifiable {
|
|
||||||
EditSecretView(store: modifiable, secret: secret)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user