mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-07 11:19:58 +02:00
feat(apple): send files to a remembered device
Adds the Send files action to the device detail, routing the picked selection through sendToContact. Rather than a second picker path, sharePickedFiles now takes a ShareDestination, so the macOS security-scoped access handling covers both routes. A contact destination carries no access policy, matching the core's rule that an offer share is never public.
This commit is contained in:
@@ -220,7 +220,19 @@ struct ContactDetailScreen: View {
|
||||
.textSelection(.enabled)
|
||||
}
|
||||
|
||||
if !contact.canSend {
|
||||
if contact.canSend {
|
||||
Section {
|
||||
Button {
|
||||
model.chooseFilesToSend(to: endpointId)
|
||||
} label: {
|
||||
Label(
|
||||
String(localized: L10n.Contacts.sendTo),
|
||||
systemSymbol: .paperplane
|
||||
)
|
||||
}
|
||||
.disabled(model.state.busyEndpoints.contains(endpointId))
|
||||
}
|
||||
} else {
|
||||
Section {
|
||||
Label(
|
||||
String(localized: L10n.Contacts.unreachableBody),
|
||||
@@ -247,6 +259,7 @@ struct ContactDetailScreen: View {
|
||||
}
|
||||
.formStyle(.grouped)
|
||||
.navigationTitle(Text(contact?.displayName ?? ""))
|
||||
.contactSendPickers(model: model)
|
||||
.onAppear { label = contact?.localLabel ?? "" }
|
||||
.onDisappear { commitLabel() }
|
||||
.confirmationDialog(
|
||||
|
||||
Reference in New Issue
Block a user