Add lead workflows, PDF signing, AR projects and photo gallery integration

This commit is contained in:
Dennis Nemec
2026-11-08 17:49:39 +01:00
parent a343bde741
commit 8d18873412
82 changed files with 6401 additions and 34 deletions

View File

@ -0,0 +1,52 @@
import SwiftUI
import QuickLook
/// Native full-screen PDF reading, including zoom, page navigation and system open-in actions.
struct LeadDocumentPreview: View {
let url: URL
@Environment(\.dismiss) private var dismiss
var body: some View {
NavigationStack {
LeadQuickLookView(url: url)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .confirmationAction) {
Button(role: .confirm) { dismiss() }
.labelStyle(.iconOnly)
.accessibilityLabel("Zurück zur Unterschrift")
}
}
}
}
}
private struct LeadQuickLookView: UIViewControllerRepresentable {
let url: URL
func makeUIViewController(context: Context) -> QLPreviewController {
let controller = QLPreviewController()
controller.dataSource = context.coordinator
return controller
}
func updateUIViewController(_ controller: QLPreviewController, context: Context) {
guard context.coordinator.url != url else { return }
context.coordinator.url = url
controller.reloadData()
}
func makeCoordinator() -> Coordinator { Coordinator(url: url) }
final class Coordinator: NSObject, QLPreviewControllerDataSource {
var url: URL
init(url: URL) { self.url = url }
func numberOfPreviewItems(in controller: QLPreviewController) -> Int { 1 }
func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> any QLPreviewItem {
url as NSURL
}
}
}