feat: Add basic support for Web Share Target API (#714)

This commit is contained in:
Krzysztof 2021-10-02 19:09:17 +01:00 committed by GitHub
parent 3f419ad7b6
commit 66fdd6c428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

View File

@ -78,5 +78,13 @@
"start_url": ".", "start_url": ".",
"display": "standalone", "display": "standalone",
"background_color": "#FFFFFF", "background_color": "#FFFFFF",
"theme_color": "#E58325" "theme_color": "#E58325",
"share_target": {
"action": "/",
"method": "GET",
"params": {
"title": "title",
"text": "recipe_import_url"
}
}
} }

View File

@ -166,10 +166,12 @@ export default {
}, },
mounted() { mounted() {
if (this.$route.query.recipe_import_url) { this.$router.onReady(() => {
this.addRecipe = true; if (this.$route.query.recipe_import_url) {
this.createRecipe(); this.addRecipe = true;
} this.createRecipe();
}
});
}, },
computed: { computed: {