b0a37e0e11
- ProfileView now shows a "View social.org" bordered button under the description card on both own and others' profiles. Tapping it opens the public feed URL in the system browser via Environment(\.openURL). - Settings gains a Backup section with "Export feed (social.org)" that fetches the feed with bypassCache, writes it to the app's tmp directory using the last path component as the filename (falling back to social.org), and presents the system share sheet so the user can save to Files, AirDrop, email, etc. - New ShareSheet.swift wraps UIActivityViewController for reuse elsewhere.
14 lines
462 B
Swift
14 lines
462 B
Swift
import SwiftUI
|
|
import UIKit
|
|
|
|
/// UIKit-bridged share sheet. Present with `.sheet(isPresented:) { ShareSheet(items: [url]) }`.
|
|
struct ShareSheet: UIViewControllerRepresentable {
|
|
let items: [Any]
|
|
|
|
func makeUIViewController(context: Context) -> UIActivityViewController {
|
|
UIActivityViewController(activityItems: items, applicationActivities: nil)
|
|
}
|
|
|
|
func updateUIViewController(_ controller: UIActivityViewController, context: Context) {}
|
|
}
|