1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-20 21:59:40 +02:00

docs/update outline (#471)

* docs update

* reorganize

* plausible analytics

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-06-07 15:04:30 -08:00 committed by GitHub
parent 95b6ab86d0
commit a75de6d1cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 104 additions and 78 deletions

View file

@ -110,15 +110,19 @@ export default {
this.$refs.deleteRecipieConfirm.open();
break;
case "share":
if (navigator.share){
navigator.share({
title: this.name,
text: this.recipeText,
url: this.recipeURL,
})
.then(() => console.log('Successful share'))
.catch((error) => console.log('WebShareAPI not supported', error))
} else this.updateClipboard();
if (navigator.share) {
navigator
.share({
title: this.name,
text: this.recipeText,
url: this.recipeURL,
})
.then(() => console.log("Successful share"))
.catch(error => {
console.log("WebShareAPI not supported", error);
this.updateClipboard();
});
} else this.updateClipboard();
break;
case "edit":
this.$router.push(`/recipe/${this.slug}` + "?edit=true");
@ -138,10 +142,13 @@ export default {
updateClipboard() {
const copyText = this.recipeURL;
navigator.clipboard.writeText(copyText).then(
() => { console.log("Copied to Clipboard", copyText);
utils.notify.success("Copied to Clipboard");},
() => console.log("Copied Failed", copyText));
() => {
console.log("Copied to Clipboard", copyText);
utils.notify.success("Copied to Clipboard");
},
() => console.log("Copied Failed", copyText)
);
},
},
}
};
</script>