feature: OneDrive folder as a second send transport
send(anchor:) now branches on TransportSettings.transport(). OneDrive mode skips AirDrop entirely: it verifies the resolved OneDrive folder exists right before composing (never trusts stale state), archives the session immediately after the PDF lands, and sets "Saved to OneDrive — N page(s). Open it in Files on your iPad." AirDrop's existing behaviour, including handleDidFailToShareItems, is untouched and only reached from the .airDrop branch. AppModel seeds outbox/watch from TransportSettings.effectiveFolders() instead of FolderSettings.resolve() directly, tracks the live `transport`, and bootstrap() creates the OneDrive folder and sets the watcher's recordUncommented flag (true only for AirDrop) before the watcher starts. Settings gets a "Send via" segmented picker above Folders. AirDrop shows the existing watch/output rows; OneDrive shows a single read-only OneDrive folder row (Choose... reuses the existing directory picker) plus one caption explaining the same-folder round trip, or a "No OneDrive folder found" prompt when nothing resolves (Choose... stays usable). Switching transport re-points the watcher's folder and recordUncommended live; AirDrop's own folder overrides are stored separately and are untouched by a OneDrive-and-back round trip. Menu's "Send..." row reads "Send to OneDrive" when that transport is active. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ZiTXPbPCSjzPVsfoweAbp
This commit is contained in:
@@ -91,7 +91,7 @@ struct MenuBarView: View {
|
||||
model.setStatus("Send is not available in this build.")
|
||||
}
|
||||
} label: {
|
||||
actionLabel("Send…")
|
||||
actionLabel(model.transport == .oneDrive ? "Send to OneDrive" : "Send…")
|
||||
}
|
||||
.disabled(model.session.isEmpty || model.isSending)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user