Skip to content

Commit

Permalink
feat: Add basic support for Web Share Target API (mealie-recipes#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
korapp authored Oct 2, 2021
1 parent 3f419ad commit 66fdd6c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
12 changes: 10 additions & 2 deletions frontend/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,13 @@
"start_url": ".",
"display": "standalone",
"background_color": "#FFFFFF",
"theme_color": "#E58325"
}
"theme_color": "#E58325",
"share_target": {
"action": "/",
"method": "GET",
"params": {
"title": "title",
"text": "recipe_import_url"
}
}
}
10 changes: 6 additions & 4 deletions frontend/src/components/UI/TheRecipeFab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,12 @@ export default {
},
mounted() {
if (this.$route.query.recipe_import_url) {
this.addRecipe = true;
this.createRecipe();
}
this.$router.onReady(() => {
if (this.$route.query.recipe_import_url) {
this.addRecipe = true;
this.createRecipe();
}
});
},
computed: {
Expand Down

0 comments on commit 66fdd6c

Please sign in to comment.