Add Share Extension for importing recipes via URL
Adds a Share Extension so users can share URLs from Safari (or any app) to open the main app with the ImportURLSheet pre-filled. Uses a custom URL scheme (nextcloud-cookbook://) as the bridge between the extension and the main app. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ struct ImportURLSheet: View {
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
|
||||
var onImport: (RecipeDetail) -> Void
|
||||
var initialURL: String = ""
|
||||
|
||||
@State private var url: String = ""
|
||||
@State private var isLoading: Bool = false
|
||||
@@ -62,6 +63,11 @@ struct ImportURLSheet: View {
|
||||
} message: {
|
||||
Text(alertMessage)
|
||||
}
|
||||
.onAppear {
|
||||
if !initialURL.isEmpty {
|
||||
url = initialURL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user